More abilities, refactor IPokemon.SetStatus to pass pokemon that caused the status change
All checks were successful
Build / Build (push) Successful in 50s
All checks were successful
Build / Build (push) Successful in 50s
This commit is contained in:
@@ -34,7 +34,7 @@ public class Bounce : Script
|
||||
var random = battle.Random;
|
||||
if (random.EffectChance(30, move, target, hit))
|
||||
{
|
||||
target.SetStatus("paralyzed", false);
|
||||
target.SetStatus("paralyzed", move.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public class FireFang : Script
|
||||
var random = battleData.Battle.Random;
|
||||
if (random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.SetStatus("burned", false);
|
||||
target.SetStatus("burned", move.User);
|
||||
}
|
||||
|
||||
// It also has an independent 10% chance of causing the target to flinch, if the user attacks before the target.
|
||||
|
||||
@@ -28,7 +28,7 @@ public class FlameWheel : Script
|
||||
|
||||
if (move.Battle.Random.EffectChance(_burnChance, move, target, hit))
|
||||
{
|
||||
target.SetStatus("burned", false);
|
||||
target.SetStatus("burned", move.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ public class FlareBlitz : Script
|
||||
|
||||
if (battleData.Battle.Random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.SetStatus("burned", false);
|
||||
target.SetStatus("burned", move.User);
|
||||
}
|
||||
|
||||
move.User.Damage(recoilDamage, DamageSource.Misc);
|
||||
|
||||
@@ -31,7 +31,7 @@ public class FreezeDry : Script
|
||||
|
||||
if (battleData.Battle.Random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.SetStatus("frozen", false);
|
||||
target.SetStatus("frozen", move.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ public class FreezeShock : BaseChargeMove<RequireChargeEffect>
|
||||
|
||||
if (battleData.Battle.Random.EffectChance(30, move, target, hit))
|
||||
{
|
||||
target.SetStatus("paralyzed", false);
|
||||
target.SetStatus("paralyzed", move.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ public class IceBurn : BaseChargeMove<RequireChargeEffect>
|
||||
|
||||
if (battleData.Battle.Random.EffectChance(30, move, target, hit))
|
||||
{
|
||||
target.SetStatus("burned", false);
|
||||
target.SetStatus("burned", move.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public class IceFang : Script
|
||||
|
||||
if (battleData.Battle.Random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.SetStatus("frozen", false);
|
||||
target.SetStatus("frozen", move.User);
|
||||
}
|
||||
if (battleData.Battle.Random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ public class PoisonTail : Script
|
||||
|
||||
if (battleData.Battle.Random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.SetStatus(ScriptUtils.ResolveName<BadlyPoisoned>(), false);
|
||||
target.SetStatus(ScriptUtils.ResolveName<BadlyPoisoned>(), move.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,8 @@ public class Rest : Script
|
||||
return;
|
||||
}
|
||||
|
||||
if (move.User.SetStatus(ScriptUtils.ResolveName<Sleep>(), true) && move.User.StatusScript.Script is Sleep sleep)
|
||||
if (move.User.SetStatus(ScriptUtils.ResolveName<Sleep>(), move.User) &&
|
||||
move.User.StatusScript.Script is Sleep sleep)
|
||||
sleep.Turns = 2;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,6 @@ public class SetStatus : Script
|
||||
{
|
||||
if (_status == null)
|
||||
throw new Exception("Missing required parameter 'status'");
|
||||
target.SetStatus(_status, false);
|
||||
target.SetStatus(_status, move.User);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public class ThunderFang : Script
|
||||
var random = move.Battle.Random;
|
||||
if (random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.SetStatus(ScriptUtils.ResolveName<Paralyzed>(), false);
|
||||
target.SetStatus(ScriptUtils.ResolveName<Paralyzed>(), move.User);
|
||||
}
|
||||
if (random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ public class ToxicThread : Script
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
target.SetStatus(ScriptUtils.ResolveName<Status.Poisoned>(), false);
|
||||
target.SetStatus(ScriptUtils.ResolveName<Status.Poisoned>(), move.User);
|
||||
target.ChangeStatBoost(Statistic.Speed, -1, false, false);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,6 @@ public class TriAttack : Script
|
||||
ScriptUtils.ResolveName<Status.Paralyzed>(),
|
||||
ScriptUtils.ResolveName<Status.Frozen>(),
|
||||
]);
|
||||
target.SetStatus(status, false);
|
||||
target.SetStatus(status, move.User);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public class Twineedle : Script
|
||||
{
|
||||
if (move.Battle.Random.EffectChance(20, move, target, hit))
|
||||
{
|
||||
target.SetStatus(ScriptUtils.ResolveName<Status.Poisoned>(), false);
|
||||
target.SetStatus(ScriptUtils.ResolveName<Status.Poisoned>(), move.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public class VoltTackle : Script
|
||||
|
||||
if (move.Battle.Random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.SetStatus(ScriptUtils.ResolveName<Status.Paralyzed>(), false);
|
||||
target.SetStatus(ScriptUtils.ResolveName<Status.Paralyzed>(), move.User);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user