Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Leadership & Authority
- WeaponType leadership = Global.weapon_types[11];
- int authority = actor.get_weapon_level(leadership);
- bool leader = false;
- if (Global.scene.is_map_scene && !Global.game_map.is_off_map(Loc))
- foreach (int id in units_in_range(3))
- {
- Game_Unit unit = Global.game_map.units[id];
- int auraDistance = Global.game_map.unit_distance(Id, unit.id);
- if (unit.actor.get_weapon_level(leadership) >= 2) // D rank or higher
- leader = true;
- if (leader == true && !is_attackable_team(unit))
- {
- if (unit.actor.get_weapon_level(leadership) >= 5 || auraDistance < 3) // A rank or higher
- {
- n += (int)(2.5 * (unit.actor.get_weapon_level(leadership) - 1));
- break;
- }
- }
- }
- if (authority >= 2) // D or higher
- {
- if (target != null)
- {
- int targ_auth = target.actor.get_weapon_level(leadership);
- if (authority > targ_auth)
- if (targ_auth == 0) // treat no rank the same as E rank
- targ_auth++;
- actor_hit += (authority - targ_auth) * 2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment