Compare commits

...
Author SHA1 Message Date
JadedArts 14f7c4051c Begin standardizing Move Action Effects
A stat boost failing to change stats now has a 1 second pause in the battle system for improved readability.

Set up Amnesia and Nasty Plot to use Fork Keyframes in their Action Effect timelines.

Fixed positioning on Amnesia and Nasty Plot particles.
2026-11-27 15:17:46 -06:00
11 changed files with 100 additions and 81 deletions

No files matched your search

@@ -22,6 +22,7 @@ import com.cobblemon.mod.common.battles.ShowdownInterpreter
import com.cobblemon.mod.common.battles.dispatch.ActionEffectInstruction
import com.cobblemon.mod.common.battles.dispatch.GO
import com.cobblemon.mod.common.battles.dispatch.UntilDispatch
import com.cobblemon.mod.common.battles.dispatch.WaitDispatch
import com.cobblemon.mod.common.util.battleLang
import com.cobblemon.mod.common.util.cobblemonResource
import java.util.concurrent.CompletableFuture
@@ -82,6 +83,7 @@ class BoostInstruction(battle: PokemonBattle, val message: BattleMessage, val is
else -> battleLang("$rootKey.$severity", pokemon.getName(), stat)
}
battle.broadcastChatMessage(lang)
if (stages == 0) return@dispatch WaitDispatch(1F)
val boostBucket = if (isBoost) BattleContext.Type.BOOST else BattleContext.Type.UNBOOST
val context = ShowdownInterpreter.getContextFromAction(message, boostBucket, battle)
@@ -17,7 +17,7 @@
"active_time": 1.5
},
"minecraft:emitter_shape_sphere": {
"offset": [-0.68571, 1.16204, -0.68571],
"offset": [0.68571, 1.16204, -0.68571],
"radius": 0.125,
"surface_only": true,
"direction": ["((v.particle_random_1)-0.5)*4", 0, "((v.particle_random_3)-0.5)*4"]
@@ -16,13 +16,13 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.68571, 1.16204, -0.68571]
"offset": [0.68571, 1.16204, -0.68571]
},
"minecraft:particle_lifetime_expression": {
"max_lifetime": 1
},
"minecraft:particle_motion_parametric": {
"relative_position": [0.68571, "-1.6*(math.pow((0.5*((math.clamp(v.particle_age, 0, 0.5))-0.5)), 2))+1.26204", -0.68571]
"relative_position": [-0.68571, "-1.6*(math.pow((0.5*((math.clamp(v.particle_age, 0, 0.5))-0.5)), 2))+1.26204", -0.68571]
},
"minecraft:particle_appearance_billboard": {
"size": [0.625, 0.625],
@@ -24,7 +24,7 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.43214, 0.31347, -0.43214],
"offset": [0.43214, 0.31347, -0.43214],
"direction": [-0.5, 0.766, -0.5]
},
"minecraft:particle_lifetime_expression": {
@@ -24,7 +24,7 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.22857, 0.07837, -0.22857],
"offset": [0.22857, 0.07837, -0.22857],
"direction": [-0.5, 0.666, -0.5]
},
"minecraft:particle_lifetime_expression": {
@@ -17,7 +17,7 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.68571, 1.16204, -0.68571],
"offset": [0.68571, 1.16204, -0.68571],
"direction": ["((v.particle_random_1)-0.5)*4", "((v.particle_random_2)-0.5)/3", "((v.particle_random_3)-0.5)*4"]
},
"minecraft:particle_lifetime_expression": {
@@ -16,13 +16,13 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.68571, 1.36204, -0.68571]
"offset": [0.68571, 1.36204, -0.68571]
},
"minecraft:particle_lifetime_expression": {
"max_lifetime": 0.5
},
"minecraft:particle_motion_parametric": {
"relative_position": [0.68571, "-0.2*(math.pow((2*((math.clamp(v.particle_age, 0, 0.5))-0.5)), 2))+1.36204", -0.68571]
"relative_position": [-0.68571, "-0.2*(math.pow((2*((math.clamp(v.particle_age, 0, 0.5))-0.5)), 2))+1.36204", -0.68571]
},
"minecraft:particle_appearance_billboard": {
"size": [0.625, 0.625],
@@ -24,7 +24,7 @@
"active_time": 2
},
"minecraft:emitter_shape_point": {
"offset": [-0.43214, 0.31347, -0.43214],
"offset": [0.43214, 0.31347, -0.43214],
"direction": [-0.5, 0.766, -0.5]
},
"minecraft:particle_lifetime_expression": {
@@ -24,7 +24,7 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.22857, 0.07837, -0.22857],
"offset": [0.22857, 0.07837, -0.22857],
"direction": [-0.5, 0.666, -0.5]
},
"minecraft:particle_lifetime_expression": {
@@ -1,14 +1,18 @@
{
"timeline": [
{
"type": "add_holds",
"holds": ["effects"]
},
"timeline": [
{
"type": "add_holds",
"holds": ["effects"]
},
{
"type": "fork",
"condition": "q.failed(q.user.uuid) == false",
"ifTrue": [
{
"type": "entity_particles",
"effect": "cobblemon:amnesia_actortrailsmall",
"locators": ["top"]
},
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.1
@@ -16,8 +20,8 @@
{
"type": "entity_particles",
"effect": "cobblemon:amnesia_actortraillarge",
"locators": ["top"]
},
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.1
@@ -25,8 +29,8 @@
{
"type": "entity_particles",
"effect": "cobblemon:amnesia_actorcloud",
"locators": ["top"]
},
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 1.8
@@ -34,8 +38,8 @@
{
"type": "entity_particles",
"effect": "cobblemon:amnesia_actorquestion",
"locators": ["top"]
},
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.25
@@ -43,18 +47,22 @@
{
"type": "entity_molang",
"expressions": ["q.play_animation(q.bedrock_stateful('amnesia', 'actor'))"]
},
},
{
"type": "pause",
"pause": 1.55
},
{
"type": "remove_holds",
"holds": ["effects"]
},
{
"type": "pause",
"pause": 1.5
"pause": 1.0
}
]
],
"ifFalse": [
{
"type": "pause",
"pause": 1.2
}
]
},
{
"type": "remove_holds",
"holds": ["effects"]
}
]
}
@@ -3,59 +3,68 @@
{
"type": "add_holds",
"holds": ["effects"]
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actortrailsmall",
"locators": ["top"]
},
{
"type": "pause",
"pause": 0.1
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actortraillarge",
"locators": ["top"]
},
{
"type": "pause",
"pause": 0.1
"type": "fork",
"condition": "q.failed(q.user.uuid) == false",
"ifTrue": [
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actortrailsmall",
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.1
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actortraillarge",
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.1
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actorcloud",
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 1.4
},
{
"type": "entity_molang",
"expressions": ["q.play_animation(q.bedrock_stateful('nastyplot', 'actor'))"]
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actorexclamation",
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.3
},
{
"type": "animation",
"animation": ["nastyplot", "status"],
"delay": 1.2
}
],
"ifFalse": [
{
"type": "animation",
"animation": ["nastyplot", "status"],
"delay": 1.2
}
]
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actorcloud",
"locators": ["top"]
},
{
"type": "pause",
"pause": 1.4
},
{
"type": "entity_molang",
"expressions": ["q.play_animation(q.bedrock_stateful('nastyplot', 'actor'))"]
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actorexclamation",
"locators": ["top"]
},
{
"type": "pause",
"pause": 0.3
},
{
"type": "animation",
"animation": ["nastyplot", "status"],
"delay": 0.5
},
{
"type": "remove_holds",
"holds": ["effects"]
},
{
"type": "pause",
"pause": 2.5
}
]
}