Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Game_Unit_Skill.cs
- // this is new
- public int bonus_attack_spd(Game_Unit target, int? distance, WeaponTriangle tri)
- {
- int spd = 0;
- // whatever skills here
- return spd;
- }
- // Game_Unit.cs
- private int attacks_per_round(int spd, Combat_Map_Object target, int distance)
- {
- WeaponTriangle tri = WeaponTriangle.Nothing; // added
- if (target.is_unit() && !is_double_disabled())
- if (!stop_follow_up_modifiers(target as Game_Unit) && !(target as Game_Unit).stop_follow_up_modifiers(this))
- {
- int target_spd = (target as Game_Unit).atk_spd(distance);
- spd += bonus_attack_spd(target as Game_Unit, distance, tri); // added
- target_spd += (target as Game_Unit).bonus_attack_spd(this, distance, tri); // added
- // If enough faster than the opponent, attack twice
- if (spd - Constants.Combat.DBL_ATK_SPD >= target_spd)
- return 2;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment