Exemplo n.º 1
0
 internal Combat_Metrics(int turn, CombatTypes type, Game_Unit attacker, int attacker_hp, int weapon_1_id, int attacker_attacks,
                         List <Combat_Map_Object> targets, List <int> target_hps, List <int> weapon_2_ids, List <int> targets_attacks)
 {
     Turn       = turn;
     CombatType = type.ToString();
     Attacker   = new Combatant_Metric(attacker, attacker_hp, weapon_1_id, attacker_attacks);
     Targets    = targets == null ? new List <Combatant_Metric>() : Enumerable.Range(0, targets.Count)
                  .Select(x => new Combatant_Metric(targets[x], target_hps[x], weapon_2_ids[x], targets_attacks[x])).ToList();
 }
Exemplo n.º 2
0
        public static Combat_Metrics read(BinaryReader reader)
        {
            Combat_Metrics result = new Combat_Metrics();

            if (!Global.LOADED_VERSION.older_than(0, 4, 6, 9))
            {
                result.Turn = reader.ReadInt32();
            }
            result.CombatType = reader.ReadString();
            result.Attacker   = Combatant_Metric.read(reader);
            result.Targets.read(reader);
            return(result);
        }
Exemplo n.º 3
0
        public static Combatant_Metric read(BinaryReader reader)
        {
            Combatant_Metric result = new Combatant_Metric();

            result.Team       = reader.ReadInt32();
            result.ActorId    = reader.ReadInt32();
            result.ClassId    = reader.ReadInt32();
            result.StartHp    = reader.ReadInt32();
            result.EndHp      = reader.ReadInt32();
            result.WeaponId   = reader.ReadInt32();
            result.WeaponName = reader.ReadString();
            result.Attacks    = reader.ReadInt32();
            result.Loc        = result.Loc.read(reader);
            return(result);
        }