More move scripts
This commit is contained in:
@@ -1570,7 +1570,8 @@
|
||||
"mirror",
|
||||
"sound",
|
||||
"distance",
|
||||
"ignore-substitute"
|
||||
"ignore-substitute",
|
||||
"not_sketchable"
|
||||
],
|
||||
"effect": {
|
||||
"name": "confuse"
|
||||
@@ -3739,10 +3740,9 @@
|
||||
"defrost"
|
||||
],
|
||||
"effect": {
|
||||
"name": "set_status",
|
||||
"chance": 10,
|
||||
"name": "flame_wheel",
|
||||
"parameters": {
|
||||
"status": "burned"
|
||||
"burn_chance": 10.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -9249,7 +9249,13 @@
|
||||
"protect",
|
||||
"mirror",
|
||||
"defrost"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "flame_wheel",
|
||||
"parameters": {
|
||||
"burn_chance": 50.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sacred_sword",
|
||||
@@ -9264,7 +9270,10 @@
|
||||
"contact",
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "chip_away"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "safeguard",
|
||||
@@ -9277,7 +9286,10 @@
|
||||
"category": "status",
|
||||
"flags": [
|
||||
"snatch"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "safeguard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sand_attack",
|
||||
@@ -9292,7 +9304,13 @@
|
||||
"protect",
|
||||
"reflectable",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_target_accuracy",
|
||||
"parameters": {
|
||||
"amount": -1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sand_tomb",
|
||||
@@ -9306,7 +9324,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "bind"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sandstorm",
|
||||
@@ -9317,7 +9338,13 @@
|
||||
"priority": 0,
|
||||
"target": "All",
|
||||
"category": "status",
|
||||
"flags": []
|
||||
"flags": [],
|
||||
"effect": {
|
||||
"name": "set_weather",
|
||||
"parameters": {
|
||||
"weather": "sandstorm"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "savage_spin_out__physical",
|
||||
@@ -9329,6 +9356,7 @@
|
||||
"target": "Any",
|
||||
"category": "physical",
|
||||
"flags": []
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "savage_spin_out__special",
|
||||
@@ -9340,6 +9368,7 @@
|
||||
"target": "Any",
|
||||
"category": "special",
|
||||
"flags": []
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "scald",
|
||||
@@ -9354,7 +9383,14 @@
|
||||
"protect",
|
||||
"mirror",
|
||||
"defrost"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "set_status",
|
||||
"chance": 30,
|
||||
"parameters": {
|
||||
"status": "burned"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "scary_face",
|
||||
@@ -9369,7 +9405,13 @@
|
||||
"protect",
|
||||
"reflectable",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_target_speed",
|
||||
"parameters": {
|
||||
"amount": -2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "scratch",
|
||||
@@ -9385,6 +9427,7 @@
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "screech",
|
||||
@@ -9401,7 +9444,13 @@
|
||||
"mirror",
|
||||
"sound",
|
||||
"ignore-substitute"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_target_defense",
|
||||
"parameters": {
|
||||
"amount": -1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "searing_shot",
|
||||
@@ -9415,7 +9464,14 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "set_status",
|
||||
"chance": 30,
|
||||
"parameters": {
|
||||
"status": "burned"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "secret_power",
|
||||
@@ -9429,7 +9485,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "secret_power"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "secret_sword",
|
||||
@@ -9443,7 +9502,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "psyshock"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "seed_bomb",
|
||||
@@ -9459,6 +9521,7 @@
|
||||
"mirror",
|
||||
"ballistics"
|
||||
]
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "seed_flare",
|
||||
@@ -9472,7 +9535,14 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_target_special_defense",
|
||||
"chance": 40,
|
||||
"parameters": {
|
||||
"amount": -2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "seismic_toss",
|
||||
@@ -9488,7 +9558,10 @@
|
||||
"protect",
|
||||
"mirror",
|
||||
"nonskybattle"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "night_shade"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "self_destruct",
|
||||
@@ -9502,7 +9575,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "self_destruct"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shadow_ball",
|
||||
@@ -9517,7 +9593,14 @@
|
||||
"protect",
|
||||
"mirror",
|
||||
"ballistics"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_target_special_defense",
|
||||
"chance": 20,
|
||||
"parameters": {
|
||||
"amount": -1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shadow_bone",
|
||||
@@ -9531,7 +9614,14 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_target_defense",
|
||||
"chance": 20,
|
||||
"parameters": {
|
||||
"amount": -1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shadow_claw",
|
||||
@@ -9546,7 +9636,10 @@
|
||||
"contact",
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "increased_critical_stage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shadow_force",
|
||||
@@ -9561,14 +9654,17 @@
|
||||
"contact",
|
||||
"charge",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "shadow_force"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shadow_punch",
|
||||
"type": "ghost",
|
||||
"power": 60,
|
||||
"pp": 20,
|
||||
"accuracy": 0,
|
||||
"accuracy": 255,
|
||||
"priority": 0,
|
||||
"target": "Any",
|
||||
"category": "physical",
|
||||
@@ -9578,6 +9674,7 @@
|
||||
"mirror",
|
||||
"punch"
|
||||
]
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "shadow_sneak",
|
||||
@@ -9593,6 +9690,7 @@
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "sharpen",
|
||||
@@ -9605,7 +9703,13 @@
|
||||
"category": "status",
|
||||
"flags": [
|
||||
"snatch"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_user_attack",
|
||||
"parameters": {
|
||||
"amount": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shattered_psyche__physical",
|
||||
@@ -9617,6 +9721,7 @@
|
||||
"target": "Any",
|
||||
"category": "physical",
|
||||
"flags": []
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "shattered_psyche__special",
|
||||
@@ -9628,6 +9733,7 @@
|
||||
"target": "Any",
|
||||
"category": "special",
|
||||
"flags": []
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "sheer_cold",
|
||||
@@ -9641,7 +9747,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "one_hit_ko"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shell_smash",
|
||||
@@ -9654,7 +9763,10 @@
|
||||
"category": "status",
|
||||
"flags": [
|
||||
"snatch"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "shell_smash"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shell_trap",
|
||||
@@ -9667,7 +9779,10 @@
|
||||
"category": "special",
|
||||
"flags": [
|
||||
"protect"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "shell_trap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shift_gear",
|
||||
@@ -9680,14 +9795,21 @@
|
||||
"category": "status",
|
||||
"flags": [
|
||||
"snatch"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_multiple_user_stat_boosts",
|
||||
"parameters": {
|
||||
"attack": 1,
|
||||
"speed": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shock_wave",
|
||||
"type": "electric",
|
||||
"power": 60,
|
||||
"pp": 20,
|
||||
"accuracy": 0,
|
||||
"accuracy": 255,
|
||||
"priority": 0,
|
||||
"target": "Any",
|
||||
"category": "special",
|
||||
@@ -9695,6 +9817,7 @@
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "shore_up",
|
||||
@@ -9708,7 +9831,10 @@
|
||||
"flags": [
|
||||
"snatch",
|
||||
"heal"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "shore_up"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "signal_beam",
|
||||
@@ -9722,7 +9848,11 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "confuse",
|
||||
"chance": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "silver_wind",
|
||||
@@ -9736,7 +9866,18 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_multiple_user_stat_boosts",
|
||||
"chance": 10,
|
||||
"parameters": {
|
||||
"attack": 1,
|
||||
"defense": 1,
|
||||
"specialAttack": 1,
|
||||
"specialDefense": 1,
|
||||
"speed": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "simple_beam",
|
||||
@@ -9751,7 +9892,10 @@
|
||||
"protect",
|
||||
"reflectable",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "simple_beam"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sing",
|
||||
@@ -9768,7 +9912,13 @@
|
||||
"mirror",
|
||||
"sound",
|
||||
"ignore-substitute"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "set_status",
|
||||
"parameters": {
|
||||
"status": "sleep"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sinister_arrow_raid",
|
||||
@@ -9780,6 +9930,7 @@
|
||||
"target": "Any",
|
||||
"category": "physical",
|
||||
"flags": []
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "sketch",
|
||||
@@ -9792,7 +9943,10 @@
|
||||
"category": "status",
|
||||
"flags": [
|
||||
"ignore-substitute"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "sketch"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "skill_swap",
|
||||
@@ -9807,7 +9961,10 @@
|
||||
"protect",
|
||||
"mirror",
|
||||
"ignore-substitute"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "skill_swap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "skull_bash",
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System.Text.Json.Nodes;
|
||||
using PkmnLib.Dynamic.Libraries;
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Static.Moves;
|
||||
using PkmnLib.Tests.Integration;
|
||||
using TUnit.Core.Logging;
|
||||
|
||||
namespace PkmnLib.Tests.DataTests;
|
||||
|
||||
@@ -39,6 +41,17 @@ public class MoveDataTests
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Helper method to find the line number of the effect in the JSON file
|
||||
var file = Path.GetFullPath("../../../../PkmnLib.Tests/Data/Moves.jsonc");
|
||||
var json = await File.ReadAllLinesAsync(file);
|
||||
var moveLineNumber = json.Select((line, index) => new { line, index })
|
||||
.FirstOrDefault(x => x.line.Contains($"\"name\": \"{test.Move.Name}\""))?.index + 1;
|
||||
var effectLineNumber = moveLineNumber + json.Skip(moveLineNumber ?? 0)
|
||||
.Select((line, index) => new { line, index }).FirstOrDefault(x => x.line.Contains("effect"))
|
||||
?.index +
|
||||
1 ?? 0;
|
||||
|
||||
await TestContext.Current!.OutputWriter.WriteLineAsync("File: " + $"file://{file}:{effectLineNumber}");
|
||||
throw new AggregateException($"Failed to resolve script for move {test.Move.Name} with effect {scriptName}",
|
||||
e);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class SerializationTests
|
||||
var library = LibraryHelpers.LoadLibrary();
|
||||
await Assert.That(library.StaticLibrary.Species.TryGet("bulbasaur", out var species)).IsTrue();
|
||||
|
||||
var pokemon = new PokemonImpl(library, species!, species!.GetDefaultForm(), new AbilityIndex()
|
||||
var pokemon = new PokemonImpl(library, species!, species!.GetDefaultForm(), new AbilityIndex
|
||||
{
|
||||
Index = 0,
|
||||
IsHidden = false,
|
||||
|
||||
Reference in New Issue
Block a user