Ejemplo n.º 1
0
 public static EntryHazard Clone(EntryHazard other)
 {
     return(new EntryHazard(
                moveID: other.hazardID,
                turnsLeft: other.turnsLeft,
                layers: other.layers
                ));
 }
Ejemplo n.º 2
0
    // Clone
    public static BattleTeamProperties Clone(BattleTeamProperties original)
    {
        BattleTeamProperties clone = new BattleTeamProperties();

        for (int i = 0; i < original.entryHazards.Count; i++)
        {
            clone.entryHazards.Add(EntryHazard.Clone(original.entryHazards[i]));
        }

        clone.GMaxWildfireStatus = (original.GMaxWildfireStatus == null) ? null : original.GMaxWildfireStatus.Clone();

        for (int i = 0; i < original.lightScreens.Count; i++)
        {
            clone.lightScreens.Add(TeamCondition.Clone(original.lightScreens[i]));
        }
        for (int i = 0; i < original.matBlocks.Count; i++)
        {
            clone.matBlocks.Add(original.matBlocks[i].Clone());
        }

        for (int i = 0; i < original.reflectScreens.Count; i++)
        {
            clone.reflectScreens.Add(ReflectScreen.Clone(original.reflectScreens[i]));
        }

        for (int i = 0; i < original.safeguards.Count; i++)
        {
            clone.safeguards.Add(Safeguard.Clone(original.safeguards[i]));
        }

        clone.protectMovesActive = new List <string>(original.protectMovesActive);

        for (int i = 0; i < original.conditions.Count; i++)
        {
            clone.conditions.Add(TeamCondition.Clone(original.conditions[i]));
        }

        return(clone);
    }