This commit is contained in:
@@ -10608,7 +10608,10 @@
|
||||
"flags": [
|
||||
"reflectable",
|
||||
"nonskybattle"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "spikes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spiky_shield",
|
||||
@@ -10619,7 +10622,10 @@
|
||||
"priority": 4,
|
||||
"target": "Self",
|
||||
"category": "status",
|
||||
"flags": []
|
||||
"flags": [],
|
||||
"effect": {
|
||||
"name": "spiky_shield"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spirit_shackle",
|
||||
@@ -10633,7 +10639,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "prevent_foes_exit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spit_up",
|
||||
@@ -10646,7 +10655,10 @@
|
||||
"category": "special",
|
||||
"flags": [
|
||||
"protect"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "spit_up"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spite",
|
||||
@@ -10662,7 +10674,10 @@
|
||||
"reflectable",
|
||||
"mirror",
|
||||
"ignore-substitute"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "spite"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "splash",
|
||||
@@ -10676,6 +10691,7 @@
|
||||
"flags": [
|
||||
"gravity"
|
||||
]
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "spore",
|
||||
@@ -10691,7 +10707,13 @@
|
||||
"reflectable",
|
||||
"mirror",
|
||||
"powder"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "set_status",
|
||||
"parameters": {
|
||||
"status": "sleep"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spotlight",
|
||||
@@ -10705,7 +10727,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"reflectable"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "spotlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stealth_rock",
|
||||
@@ -10718,7 +10743,10 @@
|
||||
"category": "status",
|
||||
"flags": [
|
||||
"reflectable"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "stealth_rock"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "steam_eruption",
|
||||
@@ -10733,7 +10761,14 @@
|
||||
"protect",
|
||||
"mirror",
|
||||
"defrost"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "set_status",
|
||||
"chance": 30,
|
||||
"parameters": {
|
||||
"status": "burned"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "steamroller",
|
||||
@@ -10748,7 +10783,11 @@
|
||||
"contact",
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "flinch",
|
||||
"chance": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "steel_wing",
|
||||
@@ -10763,7 +10802,13 @@
|
||||
"contact",
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_user_defense",
|
||||
"parameters": {
|
||||
"amount": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sticky_web",
|
||||
@@ -10776,7 +10821,10 @@
|
||||
"category": "status",
|
||||
"flags": [
|
||||
"reflectable"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "sticky_web"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stockpile",
|
||||
@@ -10789,7 +10837,10 @@
|
||||
"category": "status",
|
||||
"flags": [
|
||||
"snatch"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "stockpile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stoked_sparksurfer",
|
||||
@@ -10800,7 +10851,13 @@
|
||||
"priority": 0,
|
||||
"target": "Any",
|
||||
"category": "special",
|
||||
"flags": []
|
||||
"flags": [],
|
||||
"effect": {
|
||||
"name": "set_status",
|
||||
"parameters": {
|
||||
"status": "paralyzed"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stomp",
|
||||
@@ -10816,7 +10873,11 @@
|
||||
"protect",
|
||||
"mirror",
|
||||
"nonskybattle"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "flinch",
|
||||
"chance": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stomping_tantrum",
|
||||
@@ -10831,7 +10892,10 @@
|
||||
"contact",
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "stomping_tantrum"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stone_edge",
|
||||
@@ -10845,7 +10909,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "increased_critical_stage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stored_power",
|
||||
@@ -10859,7 +10926,10 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "power_trip"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "storm_throw",
|
||||
@@ -10874,7 +10944,10 @@
|
||||
"contact",
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "storm_throw"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "strength",
|
||||
@@ -10890,6 +10963,7 @@
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
// No secondary effect
|
||||
},
|
||||
{
|
||||
"name": "strength_sap",
|
||||
@@ -10905,7 +10979,10 @@
|
||||
"reflectable",
|
||||
"mirror",
|
||||
"heal"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "strength_sap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "string_shot",
|
||||
@@ -10920,7 +10997,13 @@
|
||||
"protect",
|
||||
"reflectable",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_target_speed",
|
||||
"parameters": {
|
||||
"amount": -2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "struggle_bug",
|
||||
@@ -10934,7 +11017,13 @@
|
||||
"flags": [
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "change_target_special_attack",
|
||||
"parameters": {
|
||||
"amount": -1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stun_spore",
|
||||
@@ -10950,7 +11039,13 @@
|
||||
"reflectable",
|
||||
"mirror",
|
||||
"powder"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "set_status",
|
||||
"parameters": {
|
||||
"status": "paralyzed"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "submission",
|
||||
@@ -10965,7 +11060,13 @@
|
||||
"contact",
|
||||
"protect",
|
||||
"mirror"
|
||||
]
|
||||
],
|
||||
"effect": {
|
||||
"name": "recoil",
|
||||
"parameters": {
|
||||
"recoilPercent": 0.25
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "substitute",
|
||||
|
||||
@@ -56,4 +56,35 @@ public class MoveDataTests
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
public record SetStatusTestCaseData(IDynamicLibrary Library, IMoveData Move)
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string ToString() => Move.Name + " has valid status: " +
|
||||
Move.SecondaryEffect?.Parameters.GetValueOrDefault("status");
|
||||
}
|
||||
|
||||
public static IEnumerable<Func<SetStatusTestCaseData>> SetStatusMovesHaveValidStatusData()
|
||||
{
|
||||
var library = LibraryHelpers.LoadLibrary();
|
||||
var moveLibrary = library.StaticLibrary.Moves;
|
||||
foreach (var move in moveLibrary)
|
||||
{
|
||||
if (move.SecondaryEffect?.Name != "set_status")
|
||||
continue;
|
||||
yield return () => new SetStatusTestCaseData(library, move);
|
||||
}
|
||||
}
|
||||
|
||||
[Test, MethodDataSource(nameof(SetStatusMovesHaveValidStatusData))]
|
||||
public async Task SetStatusMovesHaveValidStatus(SetStatusTestCaseData test)
|
||||
{
|
||||
if (test.Move.SecondaryEffect == null)
|
||||
return;
|
||||
var status = test.Move.SecondaryEffect.Parameters["status"]?.ToString();
|
||||
if (status == null)
|
||||
throw new Exception("Missing required parameter 'status'");
|
||||
|
||||
await Assert.That(test.Library.ScriptResolver.TryResolve(ScriptCategory.Status, status, null, out _)).IsTrue();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user