Exemplo n.º 1
0
    public TankFactory()
    {
        baseModel = Resources.Load <GameObject>("TankModel");

        attackPower = 0.9f;
        armor       = 0.4f;
        maxHP       = 7 * 2;
        maxMP       = 6;


        baseSkills.Add(SkillFactory.GetSlam());
        baseSkills.Add(SkillFactory.GetWeakenDefense());
        baseSkills.Add(SkillFactory.GetTaunt());

        Talent t = new Talent();

        t.name        = "Enrage";
        t.description = "While health is below 50%, damage goes up by 20%";
        t.IfChosen    = unit => {
            unit.AddEffect(EffectFactory.getEnrageEffect(), -1);
        };
        talentOptions.Add(t);

        t             = new Talent();
        t.name        = "Surrounded";
        t.description = "Whenever the tank is hit, if there are more than two enemies nearby, their attacks will recoil half the damage to eachother. This damage is never fatal.";
        t.IfChosen    = unit =>
        {
            unit.AddEffect(EffectFactory.getSurroundedEffect(), -1);
        };
        talentOptions.Add(t);

        t             = new Talent();
        t.name        = "Grand Slam";
        t.description = "Double's Slam's Damage, but halfs the root effect";
        t.IfChosen    = unit =>
        {
            unit.talentTags.Add("HardSlam");
        };
        talentOptions.Add(t);

        t             = new Talent();
        t.name        = "Determination";
        t.description = "If the tank's health would go below 30% from an attack, the tank is first fully healed. Has a 6 turn cooldown";
        t.IfChosen    = unit =>
        {
            unit.AddEffect(EffectFactory.getDeterminationEffect(), -1); //-1 is permanent
        };
        talentOptions.Add(t);

        t             = new Talent();
        t.name        = "Front Lines";
        t.description = "For each enemy within 3 tiles, gain 3% hp per turn";
        t.IfChosen    = unit =>
        {
            unit.AddEffect(EffectFactory.getFrontLineEffect(), -1);
        };
        talentOptions.Add(t);

        t             = new Talent();
        t.name        = "Toughness";
        t.description = "The Tank is just tough. Nothing complicated. Slight increase to armor and damage.";
        t.IfChosen    = Unit =>
        {
            Unit.AddEffect(EffectFactory.getToughEffect(), -1);
        };
        talentOptions.Add(t);

        name        = "Tank";
        description = "A tank. Deals and takes little damage. Hinders enemies to protect his team.";
        image       = Resources.Load <Sprite>("CharacterIcons/TankIcon");
    }