コード例 #1
0
 public override void PostUpdateEquips()
 {
     if (!demonicHorns)
     {
         player.ClearBuff(mod.BuffType(DemonicHorns.buffType));
     }
     if (beguilingNecklace)
     {
         player.lifeRegen += ModHelpers.RoundOffToWhole(player.lifeRegen * BeguilingNecklace.regenMultiplier);
     }
     if (bleedingTooth)
     {
         player.statDefense -= ModHelpers.RoundOffToWhole(player.statDefense * BleedingTooth.statsMultiplier);
     }
     if (daringThighGarter)
     {
         player.statLifeMax2 += ModHelpers.RoundOffToWhole(player.statLifeMax2 * DaringThighGarter.lifeMultiplier);
         player.statManaMax2 -= ModHelpers.RoundOffToWhole(player.statManaMax2 * DaringThighGarter.manaMultiplier);
     }
     if (ringOfTemptation)
     {
         float lifeLostPercentage = (player.statLifeMax2 - player.statLife) / (float)player.statLifeMax2;
         player.statDefense += ModHelpers.RoundOffToWhole(player.statDefense * lifeLostPercentage);
         player.endurance   += player.endurance * (lifeLostPercentage / RingOfTemptation.percentageCapper);
         critDmgMultiplier  -= RingOfTemptation.critDmgReduction;
     }
     if (brokenShackles)
     {
         brokenShacklesReducBonus = player.endurance;
     }
     if (thornedChoker)
     {
         thornedChokerDefBonus = player.statDefense;
     }
 }
コード例 #2
0
 public override void GetWeaponCrit(Item item, ref int crit)
 {
     if (demonicHorns)
     {
         crit += ModHelpers.RoundOffToWhole(demonicHornsCrit);
     }
 }
コード例 #3
0
 private void BleedingToothOnHit(int dmg)
 {
     if (bleedingTooth)
     {
         LifeStealEffect();
         int healValue = ModHelpers.RoundOffToWhole(dmg * BleedingTooth.lifeStealMultiplier);
         player.statLife += healValue;
         player.HealEffect(healValue, true);
     }
 }
コード例 #4
0
 private void ComputeCriticalDamage(ref int dmg, int baseDmg)
 {
     dmg = baseDmg + ModHelpers.RoundOffToWhole(baseDmg * critDmgMultiplier);
 }