Skip to content

Commit ca8ed87

Browse files
authored
MEGA X/Y Form Fixes + Other Minor Fixes + Additional Datagen (#104)
* Fixed Corphish and Crawdaunt not spawning properly * Added Ogerpon Masks and Genesect Drives to ball loots Generated files included * Reversion to fix wiggly/bouncy entities * Fixed Mega X/Y forms * Fixed logic for full set armor bonuses
1 parent 120867c commit ca8ed87

17 files changed

Lines changed: 95 additions & 28 deletions

File tree

common/src/main/generated/resources/data/generations_core/loot_tables/chests/cherish_ball.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,10 @@
336336
"type": "minecraft:item",
337337
"name": "generations_core:shattered_relic_song_1"
338338
},
339+
{
340+
"type": "minecraft:item",
341+
"name": "generations_core:chill_drive"
342+
},
339343
{
340344
"type": "minecraft:item",
341345
"name": "cobblemon:serious_mint"

common/src/main/generated/resources/data/generations_core/loot_tables/chests/dive_ball.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@
356356
"type": "minecraft:item",
357357
"name": "generations_core:shattered_ice_key_4"
358358
},
359+
{
360+
"type": "minecraft:item",
361+
"name": "generations_core:wellspring_mask"
362+
},
359363
{
360364
"type": "minecraft:item",
361365
"name": "generations_core:tm_11"

common/src/main/generated/resources/data/generations_core/loot_tables/chests/dream_ball.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,14 @@
304304
"type": "minecraft:item",
305305
"name": "generations_core:lava_crystal"
306306
},
307+
{
308+
"type": "minecraft:item",
309+
"name": "generations_core:hearthflame_mask"
310+
},
311+
{
312+
"type": "minecraft:item",
313+
"name": "generations_core:burn_drive"
314+
},
307315
{
308316
"type": "minecraft:item",
309317
"name": "cobblemon:relaxed_mint"

common/src/main/generated/resources/data/generations_core/loot_tables/chests/friend_ball.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@
324324
"type": "minecraft:item",
325325
"name": "generations_core:shattered_ice_key_4"
326326
},
327+
{
328+
"type": "minecraft:item",
329+
"name": "generations_core:cornerstone_mask"
330+
},
327331
{
328332
"type": "minecraft:item",
329333
"name": "minecraft:porkchop"

common/src/main/generated/resources/data/generations_core/loot_tables/chests/heavy_ball.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@
300300
"type": "minecraft:item",
301301
"name": "generations_core:fragmented_drago_key_4"
302302
},
303+
{
304+
"type": "minecraft:item",
305+
"name": "generations_core:cornerstone_mask"
306+
},
303307
{
304308
"type": "minecraft:item",
305309
"name": "generations_core:rock_candy"

common/src/main/generated/resources/data/generations_core/loot_tables/chests/master_ball.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,34 @@
400400
"type": "minecraft:item",
401401
"name": "generations_core:adamant_crystal"
402402
},
403+
{
404+
"type": "minecraft:item",
405+
"name": "generations_core:wellspring_mask"
406+
},
407+
{
408+
"type": "minecraft:item",
409+
"name": "generations_core:hearthflame_mask"
410+
},
411+
{
412+
"type": "minecraft:item",
413+
"name": "generations_core:cornerstone_mask"
414+
},
415+
{
416+
"type": "minecraft:item",
417+
"name": "generations_core:shock_drive"
418+
},
419+
{
420+
"type": "minecraft:item",
421+
"name": "generations_core:burn_drive"
422+
},
423+
{
424+
"type": "minecraft:item",
425+
"name": "generations_core:chill_drive"
426+
},
427+
{
428+
"type": "minecraft:item",
429+
"name": "generations_core:douse_drive"
430+
},
403431
{
404432
"type": "minecraft:item",
405433
"name": "generations_core:tm_9"

common/src/main/generated/resources/data/generations_core/loot_tables/chests/net_ball.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,14 @@
256256
"type": "minecraft:item",
257257
"name": "generations_core:insect_plate"
258258
},
259+
{
260+
"type": "minecraft:item",
261+
"name": "generations_core:wellspring_mask"
262+
},
263+
{
264+
"type": "minecraft:item",
265+
"name": "generations_core:douse_drive"
266+
},
259267
{
260268
"type": "minecraft:item",
261269
"name": "generations_core:tm_11"

common/src/main/generated/resources/data/generations_core/loot_tables/chests/park_ball.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@
248248
"type": "minecraft:item",
249249
"name": "generations_core:gracidea"
250250
},
251+
{
252+
"type": "minecraft:item",
253+
"name": "generations_core:hearthflame_mask"
254+
},
251255
{
252256
"type": "minecraft:item",
253257
"name": "cobblemon:serious_mint"

common/src/main/generated/resources/data/generations_core/loot_tables/chests/quick_ball.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@
252252
"type": "minecraft:item",
253253
"name": "generations_core:dragon_soul"
254254
},
255+
{
256+
"type": "minecraft:item",
257+
"name": "generations_core:shock_drive"
258+
},
255259
{
256260
"type": "minecraft:item",
257261
"name": "cobblemon:sassy_mint"

common/src/main/java/generations/gg/generations/core/generationscore/common/battle/GenerationsInstructionProcessor.kt

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,24 @@ object GenerationsInstructionProcessor {
2222
val s1 = message.argumentAt(1) ?: return
2323
val s2 = s1.split(",".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
2424
if (s2.isEmpty()) return
25-
val s3 = s2[0].split("-".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
25+
val s3 = s2[0].lowercase().split("-".toRegex(), 2).dropLastWhile { it.isEmpty() }.toTypedArray()
2626

2727
if (s3.size < 2) return
2828

2929
val battlePokemon = message.battlePokemon(0, battle) ?: return
3030

31-
val name = s3[1].lowercase()
31+
val name = s3[1]
3232

3333
var pair: Pair<String, Any> = when(name) {
34-
"mega" -> {
35-
val megaStone = battlePokemon.heldItemManager.showdownId(battlePokemon) ?: return
36-
when {
37-
megaStone.endsWith("x") -> "mega_x"
38-
megaStone.endsWith("y") -> "mega_y"
39-
else -> "mega"
40-
} to true
41-
}
34+
"mega" -> "mega" to true
35+
"mega-x" -> "mega_x" to true
36+
"mega-y" -> "mega_y" to true
4237
"sunshine" -> "sunny" to true
4338
"school" -> "schooling" to true
39+
"primal" -> "primal" to true
40+
"ash" -> "ash" to true
4441
"wellspring", "hearthflame", "cornerstone", "teal" -> s3.getOrNull(2)?.takeIf { it == "Tera" }.let { "terastal" to true } ?: null
42+
4543
else -> name to true
4644
} ?: let {
4745
battlePokemon.originalPokemon.removeBattleFeature()
@@ -115,7 +113,6 @@ private fun Pokemon.removeBattleFeature() {
115113

116114
private fun Pokemon.applyBattleFeature(feature: SpeciesFeature) {
117115
this.persistentData.putString("form_name", feature.name)
118-
119116
if(feature is StringSpeciesFeature) {
120117
this.persistentData.putString("form_value", feature.value)
121118
feature.apply(this)

0 commit comments

Comments
 (0)