Merge branch 'upcoming' into ghoulsaveblock

This commit is contained in:
Bassoonian 2024-02-08 00:06:35 +01:00 committed by GitHub
commit f1ff524d4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 140 additions and 29 deletions

View File

@ -118,9 +118,6 @@ Based off RHH's pokeemerald-expansion v1.7.3 https://github.com/rh-hideout/pokee
- Berserk Gene
- Most battle items from Gen 4+
- Existing item data but missing effects:
- Mints
- Dynamax Candy
- Mulches
- Gimmighoul Coin
- Booster Energy
- Tera Shards
@ -141,6 +138,7 @@ Based off RHH's pokeemerald-expansion v1.7.3 https://github.com/rh-hideout/pokee
- *Dark Mode*.
- [Nature Colors](https://github.com/DizzyEggg/pokeemerald/tree/nature_color) in summary screen by @DizzyEggg
- [Dynamic Multichoice](https://github.com/SBird1337/pokeemerald/tree/feature/dynmulti) by @SBird1337
- [Guillotine](https://github.com/aarant/pokeemerald/tree/guillotine) (Decapitalization) by @aarant
- ***Other features***
- Pressing B while holding a Pokémon drops them like in modern games (configurable).
- Running indoors (configurable).

View File

@ -1061,13 +1061,21 @@
setsemiinvulnerablebit TRUE
.endm
.macro jumpifweathercheckchargeeffects battler:req, checkChargeTurnEffects:req, jumpInstr:req
.macro tryfiretwoturnmovenowbyeffect battler:req, checkChargeTurnEffects:req, jumpInstr:req
.byte 0xc6
.byte \battler
.byte \checkChargeTurnEffects
.4byte \jumpInstr
.endm
.macro tryfiretwoturnmovewithoutcharging battler:req, jumpInstr:req
tryfiretwoturnmovenowbyeffect \battler, TRUE, \jumpInstr
.endm
.macro tryfiretwoturnmoveaftercharging battler:req, jumpInstr:req
tryfiretwoturnmovenowbyeffect \battler, FALSE, \jumpInstr
.endm
.macro setminimize
.byte 0xc7
.endm

View File

@ -17228,6 +17228,94 @@ Move_JET_PUNCH:
blendoff
end
Move_ELECTRO_SHOT::
choosetwoturnanim ElectroShotSetUp, ElectroShotUnleash
ElectroShotEnd:
waitforvisualfinish
end
ElectroShotSetUp:
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge animation
loadspritegfx ANIM_TAG_ORBS @circles
loadspritegfx ANIM_TAG_BLACK_BALL_2 @blast
loadspritegfx ANIM_TAG_SPARK_2 @blast particles
loadspritegfx ANIM_TAG_GRAY_SMOKE @dispersal
monbg ANIM_ATTACKER
setalpha 14, 8
createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0
waitforvisualfinish
loopsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER, 0xE, 0x8
createsprite gGrowingChargeOrbSpriteTemplate, ANIM_ATTACKER, 2, 0x0
call TechnoBlastCharging1
delay 0xF
call TechnoBlastCharging2
delay 0xF
call TechnoBlastCharging1
delay 0xF
call TechnoBlastCharging2
delay 0xF
call TechnoBlastCharging1
delay 0xF
call TechnoBlastCharging2
delay 0xF
call TechnoBlastCharging1
delay 0xF
call TechnoBlastCharging2
delay 0xF
call TechnoBlastCharging1
delay 0xF
call TechnoBlastCharging2
delay 0xF
waitforvisualfinish
createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0
waitforvisualfinish
blendoff
clearmonbg ANIM_ATTACKER
goto ElectroShotEnd
ElectroShotUnleash:
loadspritegfx ANIM_TAG_ELECTRIC_ORBS
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT
loadspritegfx ANIM_TAG_ELECTRICITY
loadspritegfx ANIM_TAG_SPARK_2
setalpha 12, 8
createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0xC, 0x0
waitforvisualfinish
playsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER
delay 12
createsprite gGrowingShockWaveOrbSpriteTemplate, ANIM_ATTACKER, 2
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 2, 0, 11, RGB(31, 31, 22)
delay 50
createsoundtask SoundTask_LoopSEAdjustPanning, SE_M_THUNDERBOLT2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 1, 16, 0, 5
createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 4, 50, 1
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 50, 1
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 2, 11, 0, RGB(31, 31, 22)
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 2, 0, 11, RGB(31, 31, 22)
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
call SparkBeam
delay 20
createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0xC, 0x0, 0x0
waitforvisualfinish
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 2, 11, 0, RGB(31, 31, 22)
waitforvisualfinish
blendoff
end
Move_TERA_BLAST::
Move_AXE_KICK::
Move_LAST_RESPECTS::
@ -17271,7 +17359,6 @@ Move_HYDRO_STEAM::
Move_BLOOD_MOON::
Move_MATCHA_GOTCHA::
Move_IVY_CUDGEL::
Move_ELECTRO_SHOT::
Move_TERA_STARSTORM::
Move_FICKLE_BEAM::
Move_THUNDERCLAP::

View File

@ -3718,9 +3718,9 @@ BattleScript_PowerHerbActivation:
BattleScript_EffectTwoTurnsAttack::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
jumpifweathercheckchargeeffects BS_ATTACKER, TRUE, BattleScript_EffectHit
tryfiretwoturnmovewithoutcharging BS_ATTACKER, BattleScript_EffectHit @ e.g. Solar Beam
call BattleScript_FirstChargingTurn
jumpifweathercheckchargeeffects BS_ATTACKER, FALSE, BattleScript_TwoTurnMovesSecondTurn
tryfiretwoturnmoveaftercharging BS_ATTACKER, BattleScript_TwoTurnMovesSecondTurn @ e.g. Electro Shot
jumpifholdeffect BS_ATTACKER, HOLD_EFFECT_POWER_HERB, BattleScript_TwoTurnMovesSecondPowerHerbActivates
goto BattleScript_MoveEnd
@ -3766,7 +3766,8 @@ BattleScript_GeomancyEnd::
BattleScript_FirstChargingTurn::
attackcanceler
.if B_UPDATED_MOVE_DATA >= GEN_5 @ before Gen 5, charge moves did not print an attack string on the charge turn
@ before Gen 5, charge moves did not print an attack string on the charge turn
.if B_UPDATED_MOVE_DATA >= GEN_5
flushtextbox
attackstring
waitmessage B_WAIT_TIME_LONG
@ -3784,7 +3785,8 @@ BattleScript_TwoTurnMovesSecondPowerHerbActivates:
call BattleScript_PowerHerbActivation
call BattleScript_TwoTurnMovesSecondTurnRet
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
.if B_UPDATED_MOVE_DATA < GEN_5 @ before Gen 5, charge moves did not print an attack string on the charge turn
@ before Gen 5, charge moves did not print an attack string on the charge turn
.if B_UPDATED_MOVE_DATA < GEN_5
attackstring
.endif
goto BattleScript_HitFromCritCalc

View File

@ -613,10 +613,10 @@ static const u8 sText_TeravoltEnters[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is r
static const u8 sText_TurboblazeEnters[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is radiating\na blazing aura!");
static const u8 sText_SlowStartEnters[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} can't get it going!");
static const u8 sText_SlowStartEnd[] = _("{B_ATK_NAME_WITH_PREFIX} finally got\nits act together!");
static const u8 sText_SolarPowerHpDrop[] = _("The {B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\ntakes its toll!");
static const u8 sText_SolarPowerHpDrop[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\ntakes its toll!");
static const u8 sText_AftermathDmg[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt!");
static const u8 sText_AnticipationActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} shuddered\nin anticipation!");
static const u8 sText_ForewarnActivates[] = _("{B_SCR_ACTIVE_ABILITY} alerted {B_SCR_ACTIVE_NAME_WITH_PREFIX}\nto the {B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}!");
static const u8 sText_ForewarnActivates[] = _("{B_SCR_ACTIVE_ABILITY} alerted {B_SCR_ACTIVE_NAME_WITH_PREFIX}\nto {B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}!");
static const u8 sText_IceBodyHpGain[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nhealed it a little bit!");
static const u8 sText_SnowWarningHail[] = _("It started to hail!");
static const u8 sText_SnowWarningSnow[] = _("It started to snow!");
@ -648,14 +648,14 @@ static const u8 sText_ToxicSpikesDisappearedFromTeam[] = _("The poison spikes di
static const u8 sText_StealthRockDisappearedFromTeam[] = _("The pointed stones disappeared\nfrom around {B_ATK_TEAM2} team!");
static const u8 sText_StickyWebDisappearedFromTeam[] = _("The sticky web has disappeared from\nthe ground around {B_ATK_TEAM2} team!");
static const u8 sText_StickyWebUsed[] = _("A sticky web spreads out on the\nground around {B_DEF_TEAM2} team!");
static const u8 sText_QuashSuccess[] = _("The opposing {B_DEF_NAME_WITH_PREFIX}'s\nmove was postponed!");
static const u8 sText_QuashSuccess[] = _("{B_DEF_NAME_WITH_PREFIX}'s\nmove was postponed!");
static const u8 sText_IonDelugeOn[] = _("A deluge of ions showers\nthe battlefield!");
static const u8 sText_TopsyTurvySwitchedStats[] = _("{B_DEF_NAME_WITH_PREFIX}'s stat changes were\nall reversed!");
static const u8 sText_TerrainBecomesMisty[] = _("Mist swirled about\nthe battlefield!");
static const u8 sText_TerrainBecomesGrassy[] = _("Grass grew to cover\nthe battlefield!");
static const u8 sText_TerrainBecomesElectric[] = _("An electric current runs across\nthe battlefield!");
static const u8 sText_TerrainBecomesPsychic[] = _("The battlefield got weird!");
static const u8 sText_TargetElectrified[] = _("The {B_DEF_NAME_WITH_PREFIX}'s moves\nhave been electrified!");
static const u8 sText_TargetElectrified[] = _("{B_DEF_NAME_WITH_PREFIX}'s moves\nhave been electrified!");
static const u8 sText_AssaultVestDoesntAllow[] = _("{B_LAST_ITEM}'s effects prevent\nstatus moves from being used!\p");
static const u8 sText_GravityPreventsUsage[] = _("{B_ATK_NAME_WITH_PREFIX} can't use {B_CURRENT_MOVE}\nbecause of gravity!\p");
static const u8 sText_HealBlockPreventsUsage[] = _("{B_ATK_NAME_WITH_PREFIX} was\nprevented from healing!\p");
@ -758,7 +758,7 @@ static const u8 sText_StuffCheeksCantSelect[] = _("Stuff Cheeks cannot be\nselec
static const u8 sText_PkmnRevertedToPrimal[] = _("{B_ATK_NAME_WITH_PREFIX}'s Primal Reversion!\nIt reverted to its primal form!");
static const u8 sText_ButPokemonCantUseTheMove[] = _("But {B_ATK_NAME_WITH_PREFIX} can't\nuse the move!");
static const u8 sText_ButHoopaCantUseIt[] = _("But Hoopa can't use it\nthe way it is now!");
static const u8 sText_BrokeThroughProtection[] = _("It broke through the\n{B_DEF_NAME_WITH_PREFIX}'s protection!");
static const u8 sText_BrokeThroughProtection[] = _("It broke through\n{B_DEF_NAME_WITH_PREFIX}'s protection!");
static const u8 sText_AbilityAllowsOnlyMove[] = _("{B_ATK_ABILITY} allows the\nuse of only {B_CURRENT_MOVE}!\p");
static const u8 sText_SwappedAbilities[] = _("{B_DEF_NAME_WITH_PREFIX} swapped Abilities\nwith its target!");
static const u8 sText_PastelVeilProtected[] = _("{B_DEF_NAME_WITH_PREFIX} is protected\nby a pastel veil!");
@ -834,7 +834,7 @@ static const u8 sText_HurtByTheSeaOfFire[] = _("{B_ATK_TEAM1} {B_ATK_NAME_WITH_P
static const u8 sText_TheSeaOfFireDisappeared[] = _("The sea of fire around {B_ATK_TEAM2}\nteam disappeared!");
static const u8 sText_SwampEnvelopedSide[] = _("A swamp enveloped\n{B_DEF_TEAM2} team!");
static const u8 sText_TheSwampDisappeared[] = _("The swamp around {B_ATK_TEAM2}\nteam disappeared!");
static const u8 sText_HospitalityRestoration[] = _("The {B_ATK_PARTNER_NAME} drank down all\nthe matcha that Sinistcha made!");
static const u8 sText_HospitalityRestoration[] = _("{B_ATK_PARTNER_NAME} drank down all the\nmatcha that {B_ATK_NAME_WITH_PREFIX} made!");
static const u8 sText_ElectroShotCharging[] = _("{B_ATK_NAME_WITH_PREFIX} absorbed\nelectricity!");
static const u8 sText_ItemWasUsedUp[] = _("The {B_LAST_ITEM}\nwas used up...");
static const u8 sText_AttackerLostItsType[] = _("{B_ATK_NAME_WITH_PREFIX} lost\nits {B_BUFF1} type!");

View File

@ -556,7 +556,7 @@ static void Cmd_selectfirstvalidtarget(void);
static void Cmd_trysetfutureattack(void);
static void Cmd_trydobeatup(void);
static void Cmd_setsemiinvulnerablebit(void);
static void Cmd_jumpifweathercheckchargeeffects(void);
static void Cmd_tryfiretwoturnmovenowbyeffect(void);
static void Cmd_setminimize(void);
static void Cmd_sethail(void);
static void Cmd_trymemento(void);
@ -815,7 +815,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
Cmd_trysetfutureattack, //0xC3
Cmd_trydobeatup, //0xC4
Cmd_setsemiinvulnerablebit, //0xC5
Cmd_jumpifweathercheckchargeeffects, //0xC6
Cmd_tryfiretwoturnmovenowbyeffect, //0xC6
Cmd_setminimize, //0xC7
Cmd_sethail, //0xC8
Cmd_trymemento, //0xC9
@ -13672,16 +13672,31 @@ static void Cmd_setsemiinvulnerablebit(void)
gBattlescriptCurrInstr = cmd->nextInstr;
}
static void Cmd_jumpifweathercheckchargeeffects(void)
static bool32 CheckIfCanFireTwoTurnMoveNow(u8 battler, bool8 checkChargeTurnEffects)
{
// Semi-invulnerable moves cannot skip their charge turn (except with Power Herb)
if (gBattleMoveEffects[gMovesInfo[gCurrentMove].effect].semiInvulnerableEffect == TRUE)
return FALSE;
// If this move has charge turn effects, it must charge, activate them, then try to fire
if (checkChargeTurnEffects && MoveHasChargeTurnMoveEffect(gCurrentMove))
return FALSE;
// Insert custom conditions here
// Certain two-turn moves may fire on the first turn in the right weather (Solar Beam, Electro Shot)
// By default, all two-turn moves have the option of adding weather to their argument
if (IsBattlerWeatherAffected(battler, HIHALF(gMovesInfo[gCurrentMove].argument)))
return TRUE;
return FALSE;
}
static void Cmd_tryfiretwoturnmovenowbyeffect(void)
{
CMD_ARGS(u8 battler, bool8 checkChargeTurnEffects, const u8 *jumpInstr);
/* If this is NOT semi-invulnerable move and we don't have charge turn effects
yet to fire, we can fire the move right away so long as the weather matches
the argument and the battler is affected by it (not blocked by Cloud Nine etc) */
if (gBattleMoveEffects[gMovesInfo[gCurrentMove].effect].semiInvulnerableEffect == FALSE
&& !(cmd->checkChargeTurnEffects && MoveHasChargeTurnMoveEffect(gCurrentMove))
&& IsBattlerWeatherAffected(cmd->battler, HIHALF(gMovesInfo[gCurrentMove].argument)))
if (CheckIfCanFireTwoTurnMoveNow(cmd->battler, cmd->checkChargeTurnEffects) == TRUE)
{
gBattleScripting.animTurn = 1;
gBattlescriptCurrInstr = cmd->jumpInstr;

View File

@ -4653,6 +4653,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
if (!gSpecialStatuses[battler].switchInAbilityDone && IsDoubleBattle() && gBattleMons[partner].hp < gBattleMons[partner].maxHP)
{
gBattlerTarget = partner;
gBattlerAttacker = battler;
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
gBattleMoveDamage = (GetNonDynamaxMaxHP(partner) / 4) * -1;
BattleScriptPushCursorAndCallback(BattleScript_HospitalityActivates);

View File

@ -11,7 +11,7 @@ SINGLE_BATTLE_TEST("Dry Skin causes 1/8th Max HP damage in Sun")
} SCENE {
ABILITY_POPUP(player, ABILITY_DRY_SKIN);
HP_BAR(player, damage: 200 / 8);
MESSAGE("The Parasect's Dry Skin takes its toll!");
MESSAGE("Parasect's Dry Skin takes its toll!");
}
}

View File

@ -18,12 +18,12 @@ DOUBLE_BATTLE_TEST("Hospitality user restores 25% of ally's health")
} SCENE {
if (health == 75) {
ABILITY_POPUP(playerLeft, ABILITY_HOSPITALITY);
MESSAGE("The Wobbuffet drank down all the matcha that Sinistcha made!");
MESSAGE("Wobbuffet drank down all the matcha that Ptchageist made!");
HP_BAR(playerRight, damage: -25);
} else {
NONE_OF {
ABILITY_POPUP(playerLeft, ABILITY_HOSPITALITY);
MESSAGE("The Wobbuffet drank down all the matcha that Sinistcha made!");
MESSAGE("Wobbuffet drank down all the matcha that Ptchageist made!");
HP_BAR(playerRight, damage: -25);
}
}
@ -44,7 +44,7 @@ DOUBLE_BATTLE_TEST("Hospitality user restores 25% of ally's health on switch-in"
MESSAGE("Wobbuffet, that's enough! Come back!");
MESSAGE("Go! Ptchageist!");
ABILITY_POPUP(playerLeft, ABILITY_HOSPITALITY);
MESSAGE("The Wobbuffet drank down all the matcha that Sinistcha made!");
MESSAGE("Wobbuffet drank down all the matcha that Ptchageist made!");
HP_BAR(playerRight, damage: -25);
}
}
@ -65,6 +65,6 @@ DOUBLE_BATTLE_TEST("Hospitality ignores Substitute")
MESSAGE("Wobbuffet, that's enough! Come back!");
MESSAGE("Go! Ptchageist!");
ABILITY_POPUP(playerLeft, ABILITY_HOSPITALITY);
MESSAGE("The Wobbuffet drank down all the matcha that Sinistcha made!");
MESSAGE("Wobbuffet drank down all the matcha that Ptchageist made!");
}
}