public override void OnHit(Mobile attacker, IDamageable damageable, double damageBonus)
{
base.OnHit(attacker, damageable, damageBonus);
if (!attacker.CanBeHarmful(damageable, false))
{
return;
}
attacker.DoHarmful(damageable);
double damage = GetAosSpellDamage(attacker, damageable as Mobile, 48, 1, 5);
damageable.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
damageable.PlaySound(0x208);
SpellHelper.Damage(TimeSpan.FromSeconds(1.0), damageable, attacker, damage, 0, 100, 0, 0, 0);
if (ProcessingMultipleHits)
BlockHitEffects = true;
}
public override void OnHit(Mobile attacker, IDamageable defender, double damageBonus)
{
base.OnHit( attacker, defender, damageBonus );
if(attacker.Player)
{
PlayerMobile pm = (PlayerMobile)attacker;
if (defender is Mobile && ((Mobile)defender).Player)
{
Effects.SendLocationEffect(new Point3D(defender.X , defender.Y , defender.Z),this.Map, 0x3709, 15, 30);
AOS.Damage(defender, attacker, pm.(pm.RawStr+pm.RawDex)/10, 25, 60, 25, 25, 25);
((Mobile)defender).Stam -= pm.RawStr/2;
}
if (defender is Mobile && !((Mobile)defender).Player)
{
int myluck = (AosAttributes.GetValue(pm, AosAttribute.Luck));
int x = (myluck/70)*7;
double random = Utility.RandomDouble();
double chance = 0.000863316841 * x ;
if (chance >= random )
{
attacker.DoHarmful(((Mobile)defender));
Effects.SendLocationEffect(new Point3D(defender.X , defender.Y , defender.Z),this.Map, 0x3709, 15, 30);
AOS.Damage(defender, attacker, (pm.RawStr+pm.RawDex)/3, 0, 100, 0, 0, 0);
}
}
}
}
Sounds like you are talking about the "default" keyword as inYes i want the sword to flamestrike *chance to hit 1:3* So at least once every three hits it will flamestike the target *man or beast* and will do the damage of Flamestrike , so it will be just like if a mage would of casted it on you or on the beast.
I have been trying to merge for about 3mos nowo with WinMerge and have yet to get it to work, the Define default keeps coming up and i dont understand what a default is or how to define it.
int i = default;
// uses default literal
string x = default;
// same as above but without using the default literal
string x = null;
Thank you so much for this input, it will be INVALUABLE in scripting to come !Sounds like you are talking about the "default" keyword as in
C#:int i = default;
the error comes cause you're using a c# version that is pretty old, you can fix this by replacing "default" with the actual default values or upgrading your servers c# version
e.g.: for int or double it would be 0 and for a string it's null etc.
C#:// uses default literal string x = default; // same as above but without using the default literal string x = null;
See the following links for more:
- default value expressions - C# reference
- Default values of C# types - C# reference
We use essential cookies to make this site work, and optional cookies to enhance your experience.