public DefenceParam combineValues(DefenceParam baseVal, DefenceParam bonusVal) { this.intValue = baseVal.intValue + bonusVal.intValue; this.shortValue = (short)(baseVal.shortValue + bonusVal.shortValue); this.setValue(); return(this); }
public static string getDefParamState(DefenceParam defenceParam, Dictionary <string, string> messages) { switch (defenceParam.intValue) { case 0: return(messages["nDef"]); case 1: return(messages["sDef"]); case 2: return(messages["mDef"]); case 3: return(messages["gDef"]); case 4: return(messages["uDef"]); default: return("NoVal"); } }
//starting initialisation public C_Hero() { inventorySystem = new InventorySystem(); effectsStorage = new List <A_Effect>(); baseHP = 200; currentHP = 200; baseENE = 100; currentENE = 100; level = 0; currExp = 0; nextLevelExp = 100; freeSkillPoints = 1; freeAttributePoints = 4; basePhysAtk = 25; baseStrength = 0; baseEndurance = 0; baseKnowledge = 0; baseCharisma = 0; physDef = new DefenceParam(); fireDef = new DefenceParam(); airDef = new DefenceParam(); lightningDef = new DefenceParam(); earthDef = new DefenceParam(); waterDef = new DefenceParam(); lifeDef = new DefenceParam(); deathDef = new DefenceParam(); lightDef = new DefenceParam(); darknessDef = new DefenceParam(); bonusPhysDef = new DefenceParam(); bonusFireDef = new DefenceParam(); bonusAirDef = new DefenceParam(); bonusLightningDef = new DefenceParam(); bonusEarthDef = new DefenceParam(); bonusWaterDef = new DefenceParam(); bonusLifeDef = new DefenceParam(); bonusDeathDef = new DefenceParam(); bonusLightDef = new DefenceParam(); bonusDarknessDef = new DefenceParam(); totalPhysDef = new DefenceParam(); totalFireDef = new DefenceParam(); totalAirDef = new DefenceParam(); totalLightningDef = new DefenceParam(); totalEarthDef = new DefenceParam(); totalWaterDef = new DefenceParam(); totalLifeDef = new DefenceParam(); totalDeathDef = new DefenceParam(); totalLightDef = new DefenceParam(); totalDarknessDef = new DefenceParam(); money = 0; baseAP = 4; baseCritChance = 1; critDamageMod = 2.0f; }