private int CalcElementRate(SkillData skill, EElement skillElement, int skillElemValue, EElement attackerElement, int attackerElemValue) { if (skill != null && skill.IsIgnoreElement()) { skillElement = EElement.None; attackerElement = EElement.None; } EElement weakElement = UnitParam.GetWeakElement(this.mCurrentUnit.Element); EElement resistElement = UnitParam.GetResistElement(this.mCurrentUnit.Element); int num = 0; if (attackerElement != EElement.None) { num += weakElement != attackerElement ? (resistElement != attackerElement ? 0 : -1) : 1; } if (skillElement != EElement.None) { num += weakElement != skillElement ? (resistElement != skillElement ? 0 : -1) : 1; } return(num); }
private static string ElementToString(EElement element) { return(LocalizedText.Get(string.Format("sys.ABILITY_CONDS_ELEMENT_{0}", (object)element))); }
public static EElement GetWeakElement(EElement type) { return(UnitParam.WeakElements[(int)type]); }
public RecommendTeamSetting(GlobalVars.RecommendType type, EElement elem) { this.recommendedType = type; this.recommendedElement = elem; }
public static void FilterUnitsRevert(List <UnitData> units, List <int> sortValues, string[] filter) { if (filter == null) { return; } int num1 = 0; int num2 = 0; int num3 = 0; List <string> stringList = new List <string>(); string s = (string)null; for (int index = 0; index < filter.Length; ++index) { if (UnitListV2.GetValue(filter[index], "RARE:", ref s)) { int result; if (int.TryParse(s, out result)) { num1 |= 1 << result; } } else if (UnitListV2.GetValue(filter[index], "ELEM:", ref s)) { try { EElement eelement = (EElement)Enum.Parse(typeof(EElement), s, true); num2 |= 1 << (int)(eelement & (EElement)31 & (EElement)31); } catch { if (GameUtility.IsDebugBuild) { Debug.LogError((object)("Unknown element type: " + s)); } } } else if (UnitListV2.GetValue(filter[index], "WEAPON:", ref s)) { try { AttackDetailTypes attackDetailTypes = (AttackDetailTypes)Enum.Parse(typeof(AttackDetailTypes), s, true); num3 |= 1 << (int)(attackDetailTypes & (AttackDetailTypes)31 & (AttackDetailTypes)31); } catch { if (GameUtility.IsDebugBuild) { Debug.LogError((object)("Unknown weapon type: " + s)); } } } else if (UnitListV2.GetValue(filter[index], "BIRTH:", ref s)) { stringList.Add(s); } } for (int index = units.Count - 1; index >= 0; --index) { UnitData unit = units[index]; if ((1 << unit.Rarity & num1) != 0 || (1 << (int)(unit.Element & (EElement)31) & num2) != 0 || (unit.CurrentJob.GetAttackSkill() == null || (1 << (int)(unit.CurrentJob.GetAttackSkill().AttackDetailType & (AttackDetailTypes)31) & num3) != 0) || (string.IsNullOrEmpty((string)unit.UnitParam.birth) || stringList.Contains(unit.UnitParam.birth.ToString()))) { units.RemoveAt(index); if (sortValues != null) { sortValues.RemoveAt(index); } } } }
public bool Deserialize(JSON_ArtifactParam json) { if (json == null) { return(false); } this.iname = json.iname; this.name = json.name; this.expr = json.expr; this.flavor = json.flavor; this.spec = json.spec; this.asset = json.asset; this.voice = json.voice; this.icon = json.icon; this.tag = json.tag; this.type = (ArtifactTypes)json.type; this.rareini = json.rini; this.raremax = json.rmax; this.kakera = json.kakera; this.maxnum = json.maxnum; this.is_create = json.notsmn == 0; this.skills = (string[])null; if (json.skills != null) { this.skills = new string[json.skills.Length]; for (int index = 0; index < json.skills.Length; ++index) { this.skills[index] = json.skills[index]; } } Array.Clear((Array)this.equip_effects, 0, this.equip_effects.Length); this.equip_effects[0] = json.equip1; this.equip_effects[1] = json.equip2; this.equip_effects[2] = json.equip3; this.equip_effects[3] = json.equip4; this.equip_effects[4] = json.equip5; Array.Clear((Array)this.attack_effects, 0, this.attack_effects.Length); this.attack_effects[0] = json.attack1; this.attack_effects[1] = json.attack2; this.attack_effects[2] = json.attack3; this.attack_effects[3] = json.attack4; this.attack_effects[4] = json.attack5; this.abil_inames = (string[])null; this.abil_levels = (int[])null; this.abil_rareties = (int[])null; this.abil_shows = (int[])null; this.abil_conds = (string[])null; if (json.abils != null && json.ablvs != null && (json.abrares != null && json.abshows != null) && (json.abconds != null && json.abils.Length == json.ablvs.Length && (json.abils.Length == json.abrares.Length && json.abils.Length == json.abshows.Length)) && json.abils.Length == json.abconds.Length) { this.abil_inames = new string[json.abils.Length]; this.abil_levels = new int[json.ablvs.Length]; this.abil_rareties = new int[json.abrares.Length]; this.abil_shows = new int[json.abshows.Length]; this.abil_conds = new string[json.abconds.Length]; for (int index = 0; index < json.ablvs.Length; ++index) { this.abil_inames[index] = json.abils[index]; this.abil_levels[index] = json.ablvs[index]; this.abil_rareties[index] = json.abrares[index]; this.abil_shows[index] = json.abshows[index]; this.abil_conds[index] = json.abconds[index]; } } this.kcoin = json.kc; this.tcoin = json.tc; this.acoin = json.ac; this.mcoin = json.mc; this.pcoin = json.pp; this.buy = json.buy; this.sell = json.sell; this.enhance_cost = json.ecost; this.condition_lv = json.eqlv; this.condition_sex = (ESex)json.sex; this.condition_birth = json.birth; this.condition_element = (EElement)json.elem; this.condition_units = (string[])null; this.condition_jobs = (string[])null; this.condition_raremin = (OInt)json.eqrmin; this.condition_raremax = (OInt)json.eqrmax; if (json.units != null && json.units.Length > 0) { this.condition_units = new string[json.units.Length]; for (int index = 0; index < json.units.Length; ++index) { this.condition_units[index] = json.units[index]; } } if (json.jobs != null && json.jobs.Length > 0) { this.condition_jobs = new string[json.jobs.Length]; for (int index = 0; index < json.jobs.Length; ++index) { this.condition_jobs[index] = json.jobs[index]; } } return(true); }
public EventScript.Sequence OnRecvSkillElem(TacticsUnitController controller, EElement elem, bool isFirstPlay) { return(this.StartSequence((EventScript.TestCondition)(trigger => { if (trigger.Trigger == EventScript.ScriptSequence.StartConditions.RecvSkillElem && (!trigger.IsFirstOnly || isFirstPlay) && this.IsContainsUnit(trigger.UnitName, controller, (TacticsUnitController)null)) { return elem == (EElement)trigger.SkillElem; } return false; }), true, 0)); }
public bool Deserialize(JSON_CondEffectParam json) { if (json == null) { return(false); } this.iname = json.iname; this.job = json.job; this.buki = json.buki; this.birth = json.birth; this.sex = (ESex)json.sex; this.elem = (EElement)json.elem; this.cond = (ESkillCondition)json.cond; this.type = (ConditionEffectTypes)json.type; this.chk_target = (EffectCheckTargets)json.chktgt; this.chk_timing = (EffectCheckTimings)json.timing; this.value_ini = (OInt)json.vini; this.value_max = (OInt)json.vmax; this.rate_ini = (OInt)json.rini; this.rate_max = (OInt)json.rmax; this.turn_ini = (OInt)json.tini; this.turn_max = (OInt)json.tmax; this.curse = (OInt)json.curse; this.conditions = (EUnitCondition[])null; if (json.conds != null) { this.conditions = new EUnitCondition[json.conds.Length]; for (int index = 0; index < json.conds.Length; ++index) { if (json.conds[index] >= 0) { this.conditions[index] = (EUnitCondition)(1L << json.conds[index]); } } } this.BuffIds = (string[])null; if (json.buffs != null) { this.BuffIds = new string[json.buffs.Length]; for (int index = 0; index < json.buffs.Length; ++index) { this.BuffIds[index] = json.buffs[index]; } } this.v_poison_rate = (OInt)json.v_poi; this.v_poison_fix = (OInt)json.v_poifix; this.v_paralyse_rate = (OInt)json.v_par; this.v_blink_hit = (OInt)json.v_blihit; this.v_blink_avo = (OInt)json.v_bliavo; this.v_death_count = (OInt)json.v_dea; this.v_berserk_atk = (OInt)json.v_beratk; this.v_berserk_def = (OInt)json.v_berdef; this.v_fast = (OInt)json.v_fast; this.v_slow = (OInt)json.v_slow; this.v_donmov = (OInt)json.v_don; this.v_auto_hp_heal = (OInt)json.v_ahp; this.v_auto_mp_heal = (OInt)json.v_amp; this.v_auto_hp_heal_fix = (OInt)json.v_ahpfix; this.v_auto_mp_heal_fix = (OInt)json.v_ampfix; return(true); }
public WeaponAtk(ushort min, ushort max, EElement ele, ushort range) { AtkMin = min; AtkMax = max; Element = ele; Range = range; }
public override void ElementalReaction(EElement element) { switch (element) { case EElement.WATER: if (_element == EElement.FIRE) { // do whatever you want to do when WATER touch FIRE surface _element = EElement.WATER; _waterSphere.SetActive(true); _fireSphere.SetActive(false); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _fxEclab.Play(); _waterSpheres.SetActive(false); _isElem = true; } else if (_element == EElement.THUNDER) { // do whatever you want to do when WATER touch THUNDER surface _element = EElement.WATER; _waterSphere.SetActive(true); _fireSphere.SetActive(false); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _waterSpheres.SetActive(false); _characController.Stun(); _isElem = true; // _fxEclab.Play(); } else if (_element == EElement.WATER) { // do whatever you want to do when WATER touch WATER surface _element = EElement.WATER; _waterSphere.SetActive(false); _fireSphere.SetActive(false); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _waterSpheres.SetActive(true); _isElem = true; // _fxEclab.Play(); _isImune = true; //DEVIENT IMUNE AU FEU } else if (_element == EElement.NONE) { _element = EElement.WATER; _waterSphere.SetActive(true); _fireSphere.SetActive(false); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _waterSpheres.SetActive(false); _isElem = true; //.Play(); } break; case EElement.THUNDER: if (_element == EElement.FIRE) { // do whatever you want to do when THUNDER touch FIRE surface _element = EElement.THUNDER; _waterSphere.SetActive(false); _fireSphere.SetActive(false); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(true); _waterSpheres.SetActive(false); _isElem = true; } else if (_element == EElement.THUNDER) { // do whatever you want to do when THUNDER touch THUNDER surface _element = EElement.THUNDER; _waterSphere.SetActive(false); _fireSphere.SetActive(false); _thunderSpheres.SetActive(true); _thunderSphere.SetActive(false); _waterSpheres.SetActive(false); _isElem = true; _isFast = true; _fxElec.SetActive(true); _characController.SpeedCharac = 700; } else if (_element == EElement.WATER) { // do whatever you want to do when THUNDER touch WATER surface _element = EElement.THUNDER; _waterSphere.SetActive(false); _fireSphere.SetActive(false); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _waterSpheres.SetActive(false); _characController.Stun(); _isElem = true; } else if (_element == EElement.NONE) { _element = EElement.THUNDER; _waterSphere.SetActive(false); _fireSphere.SetActive(false); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(true); _waterSpheres.SetActive(false); _isElem = true; } break; case EElement.FIRE: if (_element == EElement.FIRE) { // do whatever you want to do when FIRE touch FIRE surface _element = EElement.FIRE; _waterSphere.SetActive(false); _fireSphere.SetActive(true); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _waterSpheres.SetActive(false); _isElem = true; //brulure = dégat !! } else if (_element == EElement.THUNDER) { // do whatever you want to do when FIRE touch THUNDER surface _element = EElement.FIRE; _waterSphere.SetActive(false); _fireSphere.SetActive(true); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _waterSpheres.SetActive(false); _isElem = true; //brulure = dégat !! } else if (_element == EElement.WATER) { // do whatever you want to do when FIRE touch WATER surface _element = EElement.FIRE; _waterSphere.SetActive(false); _fireSphere.SetActive(true); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _waterSpheres.SetActive(false); _isElem = true; //brulure = dégat !! } else if (_element == EElement.NONE) { _element = EElement.FIRE; _waterSphere.SetActive(false); _fireSphere.SetActive(true); _thunderSpheres.SetActive(false); _thunderSphere.SetActive(false); _waterSpheres.SetActive(false); _isElem = true; //brulure = dégat !! } break; } }
// Handle Element x Element public abstract void ElementalReaction(EElement element);
void Update() { if (movementState != null) { movementState.StateUpdate(); } if (living) { grabButton = joystick.GetButtonDown("Grab Weapon"); if (grabButton && totem != null && totem.GetCooledDown()) { if (weapons[totem.GetElement()].Count < weaponCounts[(int)totem.GetElement()]) { if (avatar) { SpawnWeapons(); } else if (!avatar && (!(weapon != null) || totem.GetElement() == weaponEquipped || weaponEquipped == EElement.air)) { SpawnWeapons(); } } if (onFire != null && totem.GetElement() == EElement.water) { Extinguish(); Destroy(weapons[EElement.water].Dequeue().gameObject); SetWeaponAngles(weaponEquipped, Mathf.Infinity, Mathf.Infinity, Mathf.Infinity, Mathf.Infinity); weapon = weapons[weaponEquipped].Peek(); } } dischargeButton = joystick.GetButtonDown("Discharge Weapon"); if (dischargeButton && weapon != null) { Vector2 angle = new Vector2(joystick.GetAxis("Aim Horizontal"), joystick.GetAxis("Aim Vertical")).normalized; weapon.Discharge(angle, boxCollider, spriteRenderer.flipX); weapons[weaponEquipped].Dequeue(); weapon = null; if (weapons[weaponEquipped].Count != 0) { SetWeaponAngles(weaponEquipped, Mathf.Infinity, Mathf.Infinity, Mathf.Infinity, Mathf.Infinity); weapon = weapons[weaponEquipped].Peek(); } else { if (avatar && CycleWeaponEquipped()) { weapon = weapons[weaponEquipped].Peek(); SetAllWeaponAngles(); } else { weaponEquipped = EElement.air; } } } shieldButton = joystick.GetButtonDown("Shield"); if (shieldButton && weapon != null) { } swapButton = joystick.GetButtonDown("Swap Weapon"); if (avatar && swapButton) { EElement oldWeapon = weaponEquipped; if (CycleWeaponEquipped()) { weapon = weapons[weaponEquipped].Peek(); } } } }
public string GetConditionDescription() { List <string> stringList = new List <string>(); MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; if (this.birth_id != null && this.birth_id.Length > 0) { stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_BIRTH")); bool flag = false; for (int index = 0; index < this.birth_id.Length; ++index) { if (flag) { stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OR")); } string birthplaceName = UnitParam.GetBirthplaceName(this.birth_id[index]); stringList.Add(birthplaceName); flag = true; } stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF")); } UnitGroupParam unitGroup = masterParam.GetUnitGroup(this.unit_group); if (unitGroup != null) { stringList.Add(unitGroup.GetName()); stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF")); } List <EElement> eelementList = new List <EElement>((IEnumerable <EElement>) this.conditions_elements.Keys); if (this.element_sum > 0) { bool flag = false; for (int index = 0; index < eelementList.Count; ++index) { if (this.conditions_elements[eelementList[index]] == 1) { if (flag) { stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OR")); } EElement eelement = eelementList[index]; stringList.Add(LocalizedText.Get("sys.UNIT_ELEMENT_" + (object)eelement)); stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_ELEMENT")); flag = true; } } stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF")); } if (this.sex != ESex.Unknown) { stringList.Add(LocalizedText.Get("sys.SEX_" + (object)this.sex)); stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF")); } JobGroupParam jobGroup = masterParam.GetJobGroup(this.job_group); if (jobGroup != null) { bool flag = false; for (int index = 0; index < jobGroup.jobs.Length; ++index) { if (flag) { stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OR")); } string job = jobGroup.jobs[index]; JobParam jobParam = masterParam.GetJobParam(job); stringList.Add(jobParam.name); flag = true; } stringList.Add(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF")); } stringList.RemoveAt(stringList.Count - 1); return(string.Join(string.Empty, stringList.ToArray())); }
public static EElement GetStrength(this EElement element) { return(ElementalWeaknessTable.Single(set => set.Value == element).Key); }
public AbilityExecutionData(float timeOfExecution, Ability ability, EElement element) { this.timeOfExecution = timeOfExecution; this.ability = ability; this.element = element; }
public bool Deserialize(JSON_UnitParam json) { if (json == null) { return(false); } this.iname = json.iname; this.name = json.name; this.model = json.mdl; this.grow = (OString)json.grow; this.piece = json.piece; this.birth = (OString)json.birth; this.birthID = json.birth_id; this.ability = json.ability; this.ma_quest = json.ma_quest; this.sex = (ESex)json.sex; this.rare = (byte)json.rare; this.raremax = (byte)json.raremax; this.type = (EUnitType)json.type; this.element = (EElement)json.elem; this.flag.Set(0, json.hero != 0); this.search = (byte)json.search; this.flag.Set(1, json.notsmn == 0); if (!string.IsNullOrEmpty(json.available_at)) { try { this.available_at = DateTime.Parse(json.available_at); } catch { this.available_at = DateTime.MaxValue; } } this.height = (short)json.height; this.weight = (short)json.weight; this.jobsets = (string[])null; this.mJobSetCache = (JobSetParam[])null; this.tags = (string[])null; if (json.skins != null && json.skins.Length >= 1) { this.skins = new string[json.skins.Length]; for (int index = 0; index < json.skins.Length; ++index) { this.skins[index] = json.skins[index]; } } if (UnitParam.NoJobStatus.IsExistParam(json)) { this.no_job_status = new UnitParam.NoJobStatus(); this.no_job_status.SetParam(json); } if (this.type == EUnitType.EventUnit) { return(true); } if (json.jobsets != null) { this.jobsets = new string[json.jobsets.Length]; for (int index = 0; index < this.jobsets.Length; ++index) { this.jobsets[index] = json.jobsets[index]; } } if (json.tag != null) { this.tags = json.tag.Split(','); } if (this.ini_status == null) { this.ini_status = new UnitParam.Status(); } this.ini_status.SetParamIni(json); this.ini_status.SetEnchentParamIni(json); if (this.max_status == null) { this.max_status = new UnitParam.Status(); } this.max_status.SetParamMax(json); this.max_status.SetEnchentParamMax(json); this.leader_skills[0] = json.ls1; this.leader_skills[1] = json.ls2; this.leader_skills[2] = json.ls3; this.leader_skills[3] = json.ls4; this.leader_skills[4] = json.ls5; this.leader_skills[5] = json.ls6; this.recipes[0] = json.recipe1; this.recipes[1] = json.recipe2; this.recipes[2] = json.recipe3; this.recipes[3] = json.recipe4; this.recipes[4] = json.recipe5; this.recipes[5] = json.recipe6; this.image = json.img; this.voice = json.vce; this.flag.Set(2, json.no_trw == 0); this.flag.Set(3, json.no_kb == 0); this.unlock_time = json.unlck_t; return(true); }
public Api_SupportList(FlowNode_ReqSupportList node, EElement element) : base(node) { this.m_Element = element; }
public ElemAndStr(EElement element, string title) { this.element = element; this.title = title; }
public SupportList(EElement element) { this.m_Element = element; }
public Dagger(string name, string description, float startingBoost, float boostMultiplier, float startingCost, float costMultiplier, EElement eElement, EHeroProperty eHeroProperty) : base(name, description, startingBoost, boostMultiplier, startingCost, costMultiplier, eElement, eHeroProperty) { }
protected Item(string name, string description, float startingBoost, float boostMultiplier, float startingCost, float costMultiplier, EElement eElement, EHeroProperty eHeroProperty) { Name = name; Description = description; Boost = startingBoost; BoostMultiplier = boostMultiplier; Cost = startingCost; CostMultiplier = costMultiplier; Element = eElement; HeroProperty = eHeroProperty; }
public bool Deserialize(JSON_UnitParam json) { if (json == null) { return(false); } this.no = json.no; this.iname = json.iname; this.name = json.name; this.ai = (OString)json.ai; this.model = json.mdl; this.grow = (OString)json.grow; this.piece = (OString)json.piece; this.birth = (OString)json.birth; this.skill = (OString)json.skill; this.ability = (OString)json.ability; this.ma_quest = (OString)json.ma_quest; this.sw = (OInt)Math.Max(json.sw, 1); this.sh = (OInt)Math.Max(json.sh, 1); this.sex = (ESex)json.sex; this.rare = (OInt)json.rare; this.raremax = (OInt)json.raremax; this.type = (EUnitType)json.type; this.element = (EElement)json.elem; this.hero = (OInt)json.hero; this.search = (OInt)json.search; this.stopped = (OBool)(json.stop != 0); this.summon = json.notsmn == 0; if (!string.IsNullOrEmpty(json.available_at)) { try { this.available_at = DateTime.Parse(json.available_at); } catch { this.available_at = DateTime.MaxValue; } } this.height = (OInt)json.height; this.weight = (OInt)json.weight; this.jobsets = (OString[])null; this.mJobSetCache = (JobSetParam[])null; this.tags = (string[])null; this.jobtype = (JobTypes)json.jt; this.role = (RoleTypes)json.role; this.mov = (OInt)json.mov; this.jmp = (OInt)json.jmp; this.inimp = (OInt)json.inimp; this.ma_rarity = (OInt)json.ma_rarity; this.ma_lv = (OInt)json.ma_lv; if (json.skins != null && json.skins.Length >= 1) { this.skins = new OString[json.skins.Length]; for (int index = 0; index < json.skins.Length; ++index) { this.skins[index] = (OString)json.skins[index]; } } this.djob = (OString)json.djob; this.dbuki = (OString)json.dbuki; this.default_skill = (OString)json.dskl; this.default_abilities = (OString[])null; if (json.dabi != null && json.dabi.Length > 0) { this.default_abilities = new OString[json.dabi.Length]; for (int index = 0; index < json.dabi.Length; ++index) { this.default_abilities[index] = (OString)json.dabi[index]; } } if (this.type == EUnitType.EventUnit) { return(true); } if (json.jobsets != null) { this.jobsets = new OString[json.jobsets.Length]; for (int index = 0; index < this.jobsets.Length; ++index) { this.jobsets[index] = (OString)json.jobsets[index]; } } if (json.tag != null) { this.tags = json.tag.Split(','); } if (this.ini_status == null) { this.ini_status = new BaseStatus(); } this.ini_status.param.hp = (OInt)json.hp; this.ini_status.param.mp = (OShort)json.mp; this.ini_status.param.atk = (OShort)json.atk; this.ini_status.param.def = (OShort)json.def; this.ini_status.param.mag = (OShort)json.mag; this.ini_status.param.mnd = (OShort)json.mnd; this.ini_status.param.dex = (OShort)json.dex; this.ini_status.param.spd = (OShort)json.spd; this.ini_status.param.cri = (OShort)json.cri; this.ini_status.param.luk = (OShort)json.luk; this.ini_status.enchant_resist.poison = (OInt)json.rpo; this.ini_status.enchant_resist.paralyse = (OInt)json.rpa; this.ini_status.enchant_resist.stun = (OInt)json.rst; this.ini_status.enchant_resist.sleep = (OInt)json.rsl; this.ini_status.enchant_resist.charm = (OInt)json.rch; this.ini_status.enchant_resist.stone = (OInt)json.rsn; this.ini_status.enchant_resist.blind = (OInt)json.rbl; this.ini_status.enchant_resist.notskl = (OInt)json.rns; this.ini_status.enchant_resist.notmov = (OInt)json.rnm; this.ini_status.enchant_resist.notatk = (OInt)json.rna; this.ini_status.enchant_resist.zombie = (OInt)json.rzo; this.ini_status.enchant_resist.death = (OInt)json.rde; this.ini_status.enchant_resist.knockback = (OInt)json.rkn; this.ini_status.enchant_resist.resist_buff = (OInt)0; this.ini_status.enchant_resist.resist_debuff = (OInt)json.rdf; this.ini_status.enchant_resist.berserk = (OInt)json.rbe; this.ini_status.enchant_resist.stop = (OInt)json.rcs; this.ini_status.enchant_resist.fast = (OInt)json.rcu; this.ini_status.enchant_resist.slow = (OInt)json.rcd; this.ini_status.enchant_resist.donsoku = (OInt)json.rdo; this.ini_status.enchant_resist.rage = (OInt)json.rra; if (this.max_status == null) { this.max_status = new BaseStatus(); } this.max_status.param.hp = (OInt)json.mhp; this.max_status.param.mp = (OShort)json.mmp; this.max_status.param.atk = (OShort)json.matk; this.max_status.param.def = (OShort)json.mdef; this.max_status.param.mag = (OShort)json.mmag; this.max_status.param.mnd = (OShort)json.mmnd; this.max_status.param.dex = (OShort)json.mdex; this.max_status.param.spd = (OShort)json.mspd; this.max_status.param.cri = (OShort)json.mcri; this.max_status.param.luk = (OShort)json.mluk; this.max_status.enchant_resist.poison = (OInt)json.mrpo; this.max_status.enchant_resist.paralyse = (OInt)json.mrpa; this.max_status.enchant_resist.stun = (OInt)json.mrst; this.max_status.enchant_resist.sleep = (OInt)json.mrsl; this.max_status.enchant_resist.charm = (OInt)json.mrch; this.max_status.enchant_resist.stone = (OInt)json.mrsn; this.max_status.enchant_resist.blind = (OInt)json.mrbl; this.max_status.enchant_resist.notskl = (OInt)json.mrns; this.max_status.enchant_resist.notmov = (OInt)json.mrnm; this.max_status.enchant_resist.notatk = (OInt)json.mrna; this.max_status.enchant_resist.zombie = (OInt)json.mrzo; this.max_status.enchant_resist.death = (OInt)json.mrde; this.max_status.enchant_resist.knockback = (OInt)json.mrkn; this.max_status.enchant_resist.resist_buff = (OInt)0; this.max_status.enchant_resist.resist_debuff = (OInt)json.mrdf; this.max_status.enchant_resist.berserk = (OInt)json.mrbe; this.max_status.enchant_resist.stop = (OInt)json.mrcs; this.max_status.enchant_resist.fast = (OInt)json.mrcu; this.max_status.enchant_resist.slow = (OInt)json.mrcd; this.max_status.enchant_resist.donsoku = (OInt)json.mrdo; this.max_status.enchant_resist.rage = (OInt)json.mrra; this.leader_skills[0] = json.ls1; this.leader_skills[1] = json.ls2; this.leader_skills[2] = json.ls3; this.leader_skills[3] = json.ls4; this.leader_skills[4] = json.ls5; this.leader_skills[5] = json.ls6; this.recipes[0] = json.recipe1; this.recipes[1] = json.recipe2; this.recipes[2] = json.recipe3; this.recipes[3] = json.recipe4; this.recipes[4] = json.recipe5; this.recipes[5] = json.recipe6; this.image = json.img; this.voice = json.vce; if (json.jidx != null) { this.job_option_index = new OString[json.jidx.Length]; for (int index = 0; index < json.jidx.Length; ++index) { this.job_option_index[index] = (OString)json.jidx[index]; } } if (json.jimgs != null) { this.job_images = new OString[json.jimgs.Length]; for (int index = 0; index < json.jimgs.Length; ++index) { this.job_images[index] = (OString)json.jimgs[index]; } } if (json.jvcs != null) { this.job_voices = new OString[json.jvcs.Length]; for (int index = 0; index < json.jvcs.Length; ++index) { this.job_voices[index] = (OString)json.jvcs[index]; } } this.is_throw = (OBool)(json.no_trw == 0); return(true); }
public SkillDBSkill(int id, string name, string eaName, EElement ele) { ID = id; Name = name; Element = ele; ElementLevel = 1; }
public static EElement GetResistElement(EElement type) { return(UnitParam.ResistElements[(int)type]); }
public static EElement[] GetNeutralities(this EElement element) { return(ElementalWeaknessTable.Keys.Except(new EElement[] { element.GetStrength(), element.GetWeakness() }).ToArray()); }
private EElement CalculateElement(WorldObjectStatusChangeList sc, EElement ele) { return ele; }
public static EElement GetWeakness(this EElement element) { return(ElementalWeaknessTable[element]); }
public void OnAttack(SkillData skill, EElement skillElement, int skillElemValue, EElement attackerElement, int attackerElemValue) { if (Object.op_Inequality((Object)this.ResistWeakPopup, (Object)null)) { Object.Destroy((Object)this.ResistWeakPopup); this.ResistWeakPopup = (GameObject)null; } if (this.mCurrentUnit != null && this.mCurrentUnit.IsBreakObj) { return; } int num = this.CalcElementRate(skill, skillElement, skillElemValue, attackerElement, attackerElemValue); if (num > 0) { if (!Object.op_Inequality((Object)this.WeakTemplate, (Object)null)) { return; } this.ResistWeakPopup = (GameObject)Object.Instantiate <GameObject>((M0)this.WeakTemplate); this.ResistWeakPopup.get_transform().SetParent(((Component)this).get_transform(), false); this.ResistWeakPopup.SetActive(true); } else { if (num >= 0 || !Object.op_Inequality((Object)this.ResistTemplate, (Object)null)) { return; } this.ResistWeakPopup = (GameObject)Object.Instantiate <GameObject>((M0)this.ResistTemplate); this.ResistWeakPopup.get_transform().SetParent(((Component)this).get_transform(), false); this.ResistWeakPopup.SetActive(true); } }
public override void ElementalReaction(EElement element) { // For now, no need further implementation. Let it empty. }