Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Game_Unit_Skill.CS
- #region Start Attack Bools
- bool Chivalry = false;
- #endregion
- private void start_attack_skills(int attackIndex, Game_Unit target)
- {
- if (attackIndex == -1)
- {
- // Chivalry
- if (target != null && target is Game_Unit)
- if (actor.has_skill("CHIV") && !nihil(target))
- if (target.actor.hp >= (target.actor.maxhp / 2))
- Chivalry = true;
- }
- }
- private void end_battle_skills()
- {
- // Overwritten by Vendetta and Swoop //Yeti
- // Skills: Swoop
- Swoop_Activated = false;
- Swoop_Attacked = false;
- // Skills: Trample
- Trample_Activated = false;
- Chivalry = false; // <<--
- }
- internal void dmg_skill(
- ref int skill_dmg, ref int weapon_dmg, ref int actor_dmg, ref int support_dmg,
- ref int target_def, Data_Weapon weapon,
- Game_Unit target, Data_Weapon target_weapon, WeaponTriangle tri, bool magic,
- int? distance, float effectiveness = 1)
- {
- // Skills: Chivalry
- if (chivalry_active(target) || Chivalry)
- skill_dmg += 3;
- // Skills: Chivalry
- if (target != null && target is Game_Unit)
- if (chivalry_active(this) || target.Chivalry)
- skill_dmg -= 3;
- }
- public bool chivalry_active (Game_Unit target)
- {
- if (target != null)
- if (actor.has_skill("CHIV") && !nihil(target))
- if (target.actor.hp >= target.actor.maxhp / 2)
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment