public static void OnFindMineral(BaseAbility ba, Mobile c) { AuraEffect st = (AuraEffect)ba; Aura aura = new Aura(EffectTypes.FindMineral); c.CumulativeAuraEffects[EffectTypes.FindMineral] = true; c.AddAura(st, aura); c.SendSmallUpdate(new int[] { (int)UpdateFields.PLAYER_TRACK_RESOURCES }, new object[] { 4 }); }
public static void OnFindMineral( BaseAbility ba, Mobile c ) { AuraEffect st = (AuraEffect)ba; Aura aura = new Aura( EffectTypes.FindMineral ); c.CumulativeAuraEffects[ EffectTypes.FindMineral ] = true; c.AddAura( st, aura ); c.SendSmallUpdate( new int[] { (int)UpdateFields.PLAYER_TRACK_RESOURCES }, new object[] { 4 } ); }
public void ApplyDot( Mobile c, Mobile target, int dmg, int freq, int duration ) { if ( target.Dead ) return; AuraEffect ae = null; if(this is AuraEffect) { ae = (AuraEffect)this; } else { ae = new AuraEffect( Id,0, levelMin, levelMax, bonus1, bonus2, s1, s2, s3, t1, t2, resistance,dispeltype, this.GetManaCost(c), (int)CastingTime( c ), range, duration, CoolDown( c ), 0, 0, classe ); ae.Applications = 0x01010101; } Aura aura = new DotAura( this, c, target, dmg, duration, freq ); target.AddAura( c,ae, aura, true ); }
public void MakeDMGSpellTriggers(Mobile src, Mobile target, LastSpellState state,int dmg) { int roll; #region Additional effects #region OnCriticalTalentsHandling if(state == LastSpellState.Critical) { if(src.Level > 9) { switch (src.Classe) { #region mage case Classes.Mage: // ignite if ( resistance == Resistances.Fire) { if ( src.HaveTalent( Talents.Ignite ) ) { AuraEffect ae = (AuraEffect)src.GetTalentEffect( Talents.Ignite ); AuraEffect af = (AuraEffect)Abilities.abilities[12654]; float modif = (float)ae.S1/100; af.ApplyDot(src, target, (int)(dmg*modif), af.T1, af.Duration(src)); } } break; #endregion #region warrior case Classes.Warrior: break; #endregion } } } #endregion #region Other Spell effecting Talents switch (src.Classe) { #region mage case Classes.Mage: //Impact if (state == LastSpellState.Normal) { if (src.HaveTalent(Talents.Impact)) { if (this.resistance == Resistances.Fire) { AuraEffect af = (AuraEffect)src.GetTalentEffect(Talents.Impact); roll = Utility.Random( 100 ); if(roll < af.S1) { AuraEffect ef = (AuraEffect)Abilities.abilities[(int)af.AdditionalSpell]; Aura aura = new Aura(); aura.ForceStun = true; target.AddAura(src,ef,aura,true); } } } // Improved Scorch if ( src.HaveTalent( Talents.ImprovedScorch ) && SpellTemplate.SpellEffects[ (int)Id ] == SpellTemplate.SpellEffects[ 2948 ] ) { AuraEffect ae = (AuraEffect)src.GetTalentEffect( Talents.ImprovedScorch); roll = Utility.Random( 100 ); if(roll < ae.S1) { AuraEffect ef = (AuraEffect)Abilities.abilities[(int)ae.AdditionalSpell]; Aura aura = new Aura(); aura.FireDamageTakenModifier = 1 + (float)ef.S1/100; target.AddAura(src,ef,aura,true); } } // Arcane Concentration int ClearingState = 0xd45a45; if ( src.HaveTalent( Talents.ArcaneConcentration ) ) { AuraEffect ae = (AuraEffect)src.GetTalentEffect( Talents.ArcaneConcentration); roll = Utility.Random( 100 ); if(roll < ae.H) { src.AdditionnalStates.Add(ClearingState); } } } break; #endregion #region Warlock case Classes.Warlock: ///aftewmatch if ( AbilityClasses.abilityClasses[ (int)Id ] == (int)ClassesOfSpells.Destruction ) if ( src.HaveTalent( Talents.Aftermath ) ) { AuraEffect ae = (AuraEffect)src.GetTalentEffect( Talents.Aftermath ); if ( Utility.Random( 100 ) < ae.H ) { Aura aura = new Aura(); aura.SpeedModifier = ( -( (float)ae.S1 ) / 100.0f ); aura.OnRelease = new Aura.AuraReleaseDelegate( SpellTemplate.OnCastSpeedModEnd ); target.AddAura(src, ae, aura, true ); target.ChangeRunSpeed( target.RunSpeed ); } } // pyroclasm if ( SpellTemplate.SpellEffects[ (int)Id ] == SpellTemplate.SpellEffects[ 1949 ] ||//Hell fire SpellTemplate.SpellEffects[5740] == SpellTemplate.SpellEffects[ (int)Id ] )// Rain of fire if ( src.HaveTalent( Talents.Pyroclasm ) ) { int prob = 0; if ( src.TalentLevel( Talents.Pyroclasm ) == 1 ) prob = 13; else prob = 26; if ( Utility.Random( 100 ) < prob ) { Aura aura = new Aura(); aura.ForceStun = true; target.AddAura( (AuraEffect)Abilities.abilities[ 18093 ], aura, true ); } } break; #endregion } #endregion #endregion }