More move scripts
This commit is contained in:
parent
85b513092a
commit
35b9832bda
@ -6297,7 +6297,10 @@
|
|||||||
"flags": [
|
"flags": [
|
||||||
"protect",
|
"protect",
|
||||||
"mirror"
|
"mirror"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "lock_on"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lovely_kiss",
|
"name": "lovely_kiss",
|
||||||
@ -6312,7 +6315,13 @@
|
|||||||
"protect",
|
"protect",
|
||||||
"reflectable",
|
"reflectable",
|
||||||
"mirror"
|
"mirror"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "set_status",
|
||||||
|
"parameters": {
|
||||||
|
"status": "sleep"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "low_kick",
|
"name": "low_kick",
|
||||||
@ -6327,7 +6336,10 @@
|
|||||||
"contact",
|
"contact",
|
||||||
"protect",
|
"protect",
|
||||||
"mirror"
|
"mirror"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "low_kick"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "low_sweep",
|
"name": "low_sweep",
|
||||||
@ -6342,7 +6354,13 @@
|
|||||||
"contact",
|
"contact",
|
||||||
"protect",
|
"protect",
|
||||||
"mirror"
|
"mirror"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "change_target_speed",
|
||||||
|
"parameters": {
|
||||||
|
"amount": -1
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lucky_chant",
|
"name": "lucky_chant",
|
||||||
@ -6355,7 +6373,10 @@
|
|||||||
"category": "status",
|
"category": "status",
|
||||||
"flags": [
|
"flags": [
|
||||||
"snatch"
|
"snatch"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "lucky_chant"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lunar_dance",
|
"name": "lunar_dance",
|
||||||
@ -6370,7 +6391,10 @@
|
|||||||
"snatch",
|
"snatch",
|
||||||
"heal",
|
"heal",
|
||||||
"dance"
|
"dance"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "lunar_dance"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "lunge",
|
"name": "lunge",
|
||||||
@ -6385,7 +6409,13 @@
|
|||||||
"contact",
|
"contact",
|
||||||
"protect",
|
"protect",
|
||||||
"mirror"
|
"mirror"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "change_target_attack",
|
||||||
|
"parameters": {
|
||||||
|
"amount": -1
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "luster_purge",
|
"name": "luster_purge",
|
||||||
@ -6399,7 +6429,14 @@
|
|||||||
"flags": [
|
"flags": [
|
||||||
"protect",
|
"protect",
|
||||||
"mirror"
|
"mirror"
|
||||||
]
|
],
|
||||||
|
"effect": {
|
||||||
|
"name": "change_target_special_defense",
|
||||||
|
"chance": 50,
|
||||||
|
"parameters": {
|
||||||
|
"amount": -1
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mach_punch",
|
"name": "mach_punch",
|
||||||
@ -6416,17 +6453,19 @@
|
|||||||
"mirror",
|
"mirror",
|
||||||
"punch"
|
"punch"
|
||||||
]
|
]
|
||||||
|
// No secondary effect
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "magic_coat",
|
"name": "magic_coat",
|
||||||
"type": "psychic",
|
"type": "psychic",
|
||||||
"power": 0,
|
"power": 0,
|
||||||
"pp": 15,
|
"pp": 15,
|
||||||
"accuracy": 0,
|
"accuracy": 255,
|
||||||
"priority": 4,
|
"priority": 4,
|
||||||
"target": "Self",
|
"target": "Self",
|
||||||
"category": "status",
|
"category": "status",
|
||||||
"flags": []
|
"flags": []
|
||||||
|
// No secondary effect
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "magic_room",
|
"name": "magic_room",
|
||||||
|
13
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LockOn.cs
Normal file
13
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LockOn.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||||
|
|
||||||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||||
|
|
||||||
|
[Script(ScriptCategory.Move, "lock_on")]
|
||||||
|
public class LockOn : Script
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||||
|
{
|
||||||
|
target.Volatile.Add(new LockOnEffect(target));
|
||||||
|
}
|
||||||
|
}
|
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LowKick.cs
Normal file
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LowKick.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||||
|
|
||||||
|
[Script(ScriptCategory.Move, "low_kick")]
|
||||||
|
public class LowKick : Script
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref byte basePower)
|
||||||
|
{
|
||||||
|
basePower = target.WeightInKg switch
|
||||||
|
{
|
||||||
|
< 10 => 20,
|
||||||
|
< 25 => 40,
|
||||||
|
< 50 => 60,
|
||||||
|
< 100 => 80,
|
||||||
|
< 200 => 100,
|
||||||
|
_ => 120,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
13
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LuckyChant.cs
Normal file
13
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LuckyChant.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||||
|
|
||||||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||||
|
|
||||||
|
[Script(ScriptCategory.Move, "lucky_chant")]
|
||||||
|
public class LuckyChant : Script
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||||
|
{
|
||||||
|
target.Volatile.Add(new LuckyChantEffect());
|
||||||
|
}
|
||||||
|
}
|
14
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LunarDance.cs
Normal file
14
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LunarDance.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using PkmnLib.Plugin.Gen7.Scripts.Side;
|
||||||
|
|
||||||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||||
|
|
||||||
|
[Script(ScriptCategory.Move, "lunar_dance")]
|
||||||
|
public class LunarDance : Script
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||||
|
{
|
||||||
|
var battleData = move.User.BattleData;
|
||||||
|
battleData?.BattleSide.VolatileScripts.Add(new LunarDanceEffect(battleData.Position));
|
||||||
|
}
|
||||||
|
}
|
27
Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/LockOnEffect.cs
Normal file
27
Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/LockOnEffect.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||||
|
|
||||||
|
[Script(ScriptCategory.Pokemon, "lock_on")]
|
||||||
|
public class LockOnEffect : Script
|
||||||
|
{
|
||||||
|
private readonly IPokemon _placer;
|
||||||
|
|
||||||
|
public LockOnEffect(IPokemon placer)
|
||||||
|
{
|
||||||
|
_placer = placer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void ChangeAccuracy(IExecutingMove executingMove, IPokemon target, byte hitIndex,
|
||||||
|
ref int modifiedAccuracy)
|
||||||
|
{
|
||||||
|
if (_placer != target)
|
||||||
|
return;
|
||||||
|
modifiedAccuracy = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void OnEndTurn(IBattle battle)
|
||||||
|
{
|
||||||
|
RemoveSelf();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||||
|
|
||||||
|
public class LuckyChantEffect : Script
|
||||||
|
{
|
||||||
|
private int _turnsLeft = 5;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void BlockCriticalHit(IExecutingMove move, IPokemon target, byte hit, ref bool block)
|
||||||
|
{
|
||||||
|
block = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void OnEndTurn(IBattle battle)
|
||||||
|
{
|
||||||
|
_turnsLeft--;
|
||||||
|
if (_turnsLeft > 0)
|
||||||
|
return;
|
||||||
|
RemoveSelf();
|
||||||
|
}
|
||||||
|
}
|
17
Plugins/PkmnLib.Plugin.Gen7/Scripts/Side/LunarDanceEffect.cs
Normal file
17
Plugins/PkmnLib.Plugin.Gen7/Scripts/Side/LunarDanceEffect.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
||||||
|
|
||||||
|
[Script(ScriptCategory.Side, "lunar_dance")]
|
||||||
|
public class LunarDanceEffect(byte position) : Script
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void OnSwitchIn(IPokemon pokemon, byte position1)
|
||||||
|
{
|
||||||
|
if (position != position1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pokemon.Heal(pokemon.MaxHealth);
|
||||||
|
pokemon.RestoreAllPP();
|
||||||
|
pokemon.ClearStatus();
|
||||||
|
RemoveSelf();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user