Android Open Source - rpg-droid Skill






From Project

Back to project page rpg-droid.

License

The source code is released under:

Apache License

If you think the Android project rpg-droid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * Created by jon on 8/06/14.//w w  w.  j  a va 2s . com
 */

package com.thing.rpg_droid.pathfinder;

import java.util.HashMap;

public class Skill
{
    public static HashMap<String, Ability.AbilityName> standardList = new HashMap<String, Ability.AbilityName>();

    private String mName = "";

    private int mRanks = 0;

    private int mMisc = 0;

    private Ability.AbilityName mAbility;

    private boolean mClass = false;

    private Character mCharacter = null;

    public Skill(Character pCharacter)
    {
        mCharacter = pCharacter;
    }

    public Skill(Character pCharacter, int pRanks, int pMisc, String pName, Ability.AbilityName pAbility, boolean pClass)
    {
        this(pCharacter);
        mName = pName;
        mRanks = pRanks;
        mMisc = pMisc;
        mAbility = pAbility;
        mClass = pClass;
    }

    public String getName()
    {
        return mName;
    }

    public void setName(String pValue)
    {
        mName = pValue;
    }

    public int getRanks()
    {
        return mRanks;
    }

    public void setRanks(int pRanks)
    {
        mRanks = pRanks;
    }

    public int getMisc()
    {
        return mMisc;
    }

    public void setMisc(int pMisc)
    {
        mMisc = pMisc;
    }

    public Ability.AbilityName getAbility()
    {
        return mAbility;
    }

    public void setAbility(Ability.AbilityName pAbility)
    {
        mAbility = pAbility;
    }

    public boolean getClassSkill()
    {
        return mClass;
    }

    public void setClassSkill(boolean pValue)
    {
        mClass = pValue;
    }

    public int getTotal()
    {
        int lResult = 0;

        lResult += (mRanks + mMisc + mCharacter.getAbility(mAbility).getCurrentModifier());

        if (mClass && (mRanks > 0))
            lResult += 3;

        return lResult;
    }


    static
    {
        standardList.put("Acrobatics", Ability.AbilityName.DEX);
        standardList.put("Appraise", Ability.AbilityName.INT);
        standardList.put("Bluff", Ability.AbilityName.CHA);
        standardList.put("Climb", Ability.AbilityName.STR);
        standardList.put("Craft", Ability.AbilityName.INT);
        standardList.put("Diplomacy", Ability.AbilityName.CHA);
        standardList.put("Disable Device", Ability.AbilityName.DEX);
        standardList.put("Disguise", Ability.AbilityName.CHA);
        standardList.put("Escape Artist", Ability.AbilityName.DEX);
        standardList.put("Fly", Ability.AbilityName.DEX);
        standardList.put("Handle Animal", Ability.AbilityName.CHA);
        standardList.put("Heal", Ability.AbilityName.WIS);
        standardList.put("Intimidate", Ability.AbilityName.CHA);
        standardList.put("Knowledge - Arcana", Ability.AbilityName.INT);
        standardList.put("Knowledge - Dungeoneering", Ability.AbilityName.INT);
        standardList.put("Knowledge - Engineering", Ability.AbilityName.INT);
        standardList.put("Knowledge - Geography", Ability.AbilityName.INT);
        standardList.put("Knowledge - History", Ability.AbilityName.INT);
        standardList.put("Knowledge - Local", Ability.AbilityName.INT);
        standardList.put("Knowledge - Nature", Ability.AbilityName.INT);
        standardList.put("Knowledge - Nobility", Ability.AbilityName.INT);
        standardList.put("Knowledge - Planes", Ability.AbilityName.INT);
        standardList.put("Knowledge - Religion", Ability.AbilityName.INT);
        standardList.put("Linguistics", Ability.AbilityName.INT);
        standardList.put("Perception", Ability.AbilityName.WIS);
        standardList.put("Perform", Ability.AbilityName.CHA);
        standardList.put("Profession", Ability.AbilityName.WIS);
        standardList.put("Ride", Ability.AbilityName.DEX);
        standardList.put("Sense Motive", Ability.AbilityName.WIS);
        standardList.put("Sleight of Hand", Ability.AbilityName.DEX);
        standardList.put("Spellcraft", Ability.AbilityName.INT);
        standardList.put("Stealth", Ability.AbilityName.DEX);
        standardList.put("Survival", Ability.AbilityName.WIS);
        standardList.put("Swim", Ability.AbilityName.STR);
        standardList.put("Use Magic Device", Ability.AbilityName.CHA);
    }
}




Java Source Code List

com.thing.rpg_droid.Utils.DieRoller.java
com.thing.rpg_droid.Utils.DieType.java
com.thing.rpg_droid.app.Activity_CharacterList.java
com.thing.rpg_droid.app.Activity_Charsheet.java
com.thing.rpg_droid.app.CharSheet_PageInfo.java
com.thing.rpg_droid.app.Fragment_CharacterList.java
com.thing.rpg_droid.app.ICharacter.java
com.thing.rpg_droid.app.PagerAdapter_Charsheet.java
com.thing.rpg_droid.app.ViewBinder.java
com.thing.rpg_droid.app.View_CharacterSheet_Field.java
com.thing.rpg_droid.app.dummy.DummyContent.java
com.thing.rpg_droid.pathfinder.Ability.java
com.thing.rpg_droid.pathfinder.Adapters.java
com.thing.rpg_droid.pathfinder.Appearance.java
com.thing.rpg_droid.pathfinder.ArmorClass.java
com.thing.rpg_droid.pathfinder.BodySlot.java
com.thing.rpg_droid.pathfinder.Character.java
com.thing.rpg_droid.pathfinder.Fragment_Basic.java
com.thing.rpg_droid.pathfinder.Fragment_Gear.java
com.thing.rpg_droid.pathfinder.Fragment_Skills.java
com.thing.rpg_droid.pathfinder.Fragment_Spells_Abilities.java
com.thing.rpg_droid.pathfinder.Fragment_Status.java
com.thing.rpg_droid.pathfinder.IInventoryLocation.java
com.thing.rpg_droid.pathfinder.Initiative.java
com.thing.rpg_droid.pathfinder.SavingThrow.java
com.thing.rpg_droid.pathfinder.SizeModifier.java
com.thing.rpg_droid.pathfinder.Skill.java
com.thing.rpg_droid.pathfinder.Spell.java
com.thing.rpg_droid.pathfinder.Status.java