Additional effects tweak (#7392)

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
Nephrite
2025-08-01 19:13:23 +03:00
committed by GitHub
parent 0b44093a8e
commit 73fd567520
11 changed files with 46 additions and 62 deletions

View File

@@ -40,7 +40,6 @@ Let's look at an example:
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.category = DAMAGE_CATEGORY_SPECIAL,
.sheerForceBoost = TRUE,
.additionalEffects = ADDITIONAL_EFFECTS({
.moveEffect = MOVE_EFFECT_PARALYSIS,
.chance = 10,
@@ -140,7 +139,18 @@ If you look at the example [here](#srcdatamoves_infoh), you can see that Thunder
All additional effects with a defined chance (even 100%) are treated as "secondary effects". This means that they are nullified by Sheer Force, blocked by Shield Dust or the Covert Cloak, and have their chance modified by Serene Grace. Additional effects without a chance field (effectively setting it to 0) are treated as "primary effects", which means that they cannot be blocked by the aforementioned items and abilities and their chance to occur cannot be modified; they will *always* happen.
Each move can have up to 15 additional effects, allowing you to construct monstrosities like this:
Depending on the move effect, it is possible to also set a `multistring` value. For example:
```
.additionalEffects = ADDITIONAL_EFFECTS({
.moveEffect = MOVE_EFFECT_WRAP,
.multistring = B_MSG_WRAPPED_MAGMA_STORM,
}),
```
For Magma Storm, we not only want the wrapping move effect, we want to give it a unique string when it activates. The index is an enum defined in `battle_string_ids.h` and it corresponds to an entry (for this move effect) in the `gWrappedStringIds` list in battle_message.c. For custom strings, you need to add an enum and an entry respectively. For new custom move effects, you will have to add a new set of enums and a new table of strings.
Each move can have up to 3 additional effects, allowing you to construct monstrosities like this:
```
[MOVE_POUND] =
{
@@ -165,13 +175,6 @@ Each move can have up to 15 additional effects, allowing you to construct monstr
},{
.moveEffect = MOVE_EFFECT_FLINCH,
.chance = 30,
},{
.moveEffect = MOVE_EFFECT_ALL_STATS_UP,
.chance = 40,
.self = TRUE,
},{
.moveEffect = MOVE_EFFECT_DEF_MINUS_2,
.chance = 50,
}),
.makesContact = TRUE,
.ignoresKingsRock = B_UPDATED_MOVE_FLAGS == GEN_4,