Esempio n. 1
0
        private void FixNarwhalChargeAttack()
        {
            if (Left.Stock.Name == StockNames.Narwhal || Right.Stock.Name == StockNames.Narwhal)
            {
                StockStatCalculator backLegsSide = GetStockSide(Limb.BackLegs);

                // Check if using back legs for charge attack
                if (GameAttributes[AbilityNames.ChargeAttack] > 0 &&
                    backLegsSide != null &&
                    backLegsSide.GetLimbAttributeValue(AbilityNames.ChargeAttack) > 0)
                {
                    return;                     // Charge attack is good
                }

                // Check if narwhal charge is good
                StockStatCalculator tailSide = GetStockSide(Limb.Tail);
                if (tailSide.Name == StockNames.Narwhal &&
                    ChosenBodyParts[Limb.BackLegs] == Side.Empty &&
                    !HasLandSpeed() &&
                    !HasAirSpeed() &&
                    GetStockSide(Limb.Torso).Name != StockNames.GiantSquid)            // Special case idk why
                {
                    GameAttributes[AbilityNames.ChargeAttack] = 1;                     // Charge attack is good
                }
                else
                {
                    GameAttributes[AbilityNames.ChargeAttack] = 0;                     // Bad charge attack from tuna
                }
            }
        }
Esempio n. 2
0
 private void InitAbilities()
 {
     InitPassiveAbilities();
     // TODO: Could hardcode or cache the limbs for abilities to reduce inner loop
     foreach (Limb limb in Enum.GetValues(typeof(Limb)))
     {
         StockStatCalculator side = GetStockSide(limb);
         if (side == null)
         {
             continue;
         }
         foreach (string ability in AbilityNames.Abilities)
         {
             int bodyPart = side.GetLimbAttributeBodyPart(ability);
             if (bodyPart > -1 &&
                 (Limb)bodyPart == limb &&
                 side.GetLimbAttributeValue(ability) > 0)
             {
                 GameAttributes[ability] = 1;
             }
         }
     }
 }