Fix the last TODOs, ready for final cleanup

This commit is contained in:
aldelaro5
2024-03-07 00:30:52 -05:00
parent 8b605ed221
commit 215d76be1e
7 changed files with 58 additions and 29 deletions

View File

@@ -4,6 +4,20 @@ A stopping condition that encases the actor in a block of ice. Most attacks will
## Resistance
This condition has a dedicated resistance field for actors to use: `freezeres`. If it's 100 or above, the actor is immune to it. Inflictions that requires a resistance check will use this field.
## Resistance increases for player party members
For player party member, the resistance can only be increased by processing the `FreezeRes` [BadgeEffects](../../../TextAsset%20Data/Medals%20data.md#medal-effects) with the value acting as the amount to increase it by. This only matters for enemy inflicting the player party member, it does not matter for user infliction using [items](../../../Enums%20and%20IDs/Items.md).
## Resistance increases for enemy party members
Here are the potential increases for the resistance associated (only applies to enemy party members):
- On [StartBattle](../../StartBattle.md) (not mutually exclusive):
- If the calledfrom.entity or the battleentity is `inice` while it's a `Krawler` or `CursedSkull` [enemy](../../Enums%20and%20IDs/Enemies.md), the enemy party member's `freezeres` is increased by 70
- If battleentity.`forcefire` or we are in the `GiantLair` [area](../../Enums%20and%20IDs/librarystuff/Areas.md) except for the `GiantLairFridgeInside` [map](../../Enums%20and%20IDs/Maps.md) while the enemy is a `Krawler`, `CursedSkull` or `Cape`, the enemy party member's `freezeres` is set to 110 making them immune (this override the clause above if it applied)
- On [CalculateBaseDamage](../../Damage%20pipeline/CalculateBaseDamage.md) when sucessfully inflicting this condition when property is `Freeze` (mutually exclusive, only the first that applies):
- If the corresponding [endata](../../../TextAsset%20Data/Entity%20data.md#entity-data) of the target's `hasiceanim` is true and we are either at the `GiantLairFridgeInside` [map](../../../Enums%20and%20IDs/Maps.md) or in any maps outside of the `GiantLair` area, target.`freezeres` is increased by 70
- Otherwise, if target.`frozenlastturn` is true, target.`freezeres` is increased by 25
- Otherwise, target.`freezeres` is increased by 13. The increase is 18 instead if [HardMode](../../Damage%20pipeline/HardMode.md) returns true
## [IsStopped](../IsStopped.md)
This condition is considered a stop condition and will always make this method returns true (unless skipimmobile is false while the actor'a `actimmobile` is true). This include the lite version used in the [enemy phase](../../Battle%20flow/Main%20turn%20life%20cycle.md#enemies-phase). Being stopped makes the actor unable to act regardless of their `cantmove` as well as a bunch of feature they no longer get access to.

View File

@@ -9,6 +9,12 @@ It is mentioned here because it remains important to make sure this field is upd
## Resistance
This condition has a dedicated resistance field for actors to use: `numbres`. If it's 100 or above, the actor is immune to it. Inflictions that requires a resistance check will use this field.
## Resistance increases for player party members
For player party member, the resistance can only be increased by processing the `NumbRes` [BadgeEffects](../../../TextAsset%20Data/Medals%20data.md#medal-effects) with the value acting as the amount to increase it by. This only matters for enemy inflicting the player party member, it does not matter for user infliction using [items](../../../Enums%20and%20IDs/Items.md).
## Resistance increases for enemy party members
For player party member target when property is `Numb` or `Numb1Turn` and when successfully inflicting this condition, [CalculateBaseDamage](../../Damage%20pipeline/CalculateBaseDamage.md), target.`numbres` is increased by 17. The increase is 22 instead if [HardMode](../../Damage%20pipeline/HardMode.md) returns true
## [IsStopped](../IsStopped.md)
This condition is considered a stop condition and will always make this method returns true (unless skipimmobile is false while the actor'a `actimmobile` is true). This include the lite version used in the [enemy phase](../../Battle%20flow/Main%20turn%20life%20cycle.md#enemies-phase). Being stopped makes the actor unable to act regardless of their `cantmove` as well as a bunch of feature they no longer get access to.

View File

@@ -4,6 +4,9 @@ A condition that either deals non lethal damage or heals the actor each actor tu
## Resistance
This condition has a dedicated resistance field for actors to use: `poisonres`. If it's 100 or above, the actor is immune to it. Inflictions that requires a resistance check will use this field.
## Resistance increases for player party members
For player party member, the resistance can only be increased by processing the `PoisonRes` [BadgeEffects](../../../TextAsset%20Data/Medals%20data.md#medal-effects) with the value acting as the amount to increase it by. This only matters for enemy inflicting the player party member, it does not matter for user infliction using [items](../../../Enums%20and%20IDs/Items.md).
## [SetCondition](../Conditions%20methods/SetCondition.md)
When amending the condition:

View File

@@ -9,6 +9,12 @@ It is mentioned here because it remains important to make sure this field is upd
## Resistance
This condition has a dedicated resistance field for actors to use: `sleepres`. If it's 100 or above, the actor is immune to it. Inflictions that requires a resistance check will use this field.
## Resistance increases for player party members
For player party member, the resistance can only be increased by processing the `SleepRes` [BadgeEffects](../../../TextAsset%20Data/Medals%20data.md#medal-effects) with the value acting as the amount to increase it by. This only matters for enemy inflicting the player party member, it does not matter for user infliction using [items](../../../Enums%20and%20IDs/Items.md).
## Resistance increases for enemy party members
For player party member target when property is `Sleep` and when successfully inflicting this condition, [CalculateBaseDamage](../../Damage%20pipeline/CalculateBaseDamage.md), target.`sleepres` is increased by 9. The increase is 13 instead if [HardMode](../../Damage%20pipeline/HardMode.md) returns true
## [IsStopped](../IsStopped.md)
This condition is considered a stop condition and will always make this method returns true (unless skipimmobile is false while the actor'a `actimmobile` is true). This include the lite version used in the [enemy phase](../../Battle%20flow/Main%20turn%20life%20cycle.md#enemies-phase). Being stopped makes the actor unable to act regardless of their `cantmove` as well as a bunch of feature they no longer get access to.

View File

@@ -176,7 +176,7 @@ Here's an explanation of the columns:
- Resistance increase: After infliction, it's possible the resistance used with the resistance check gets increased. This column indicates if it will happen, under what conditions it will happen and for how much
- `StatusMirror` Infliction scheme: The `StatusMirror` [medal](../../Enums%20and%20IDs/Medal.md) scheme of infliction. This medal only works in an enemy to player attack direction and it requires the resistance used for the resistance check to be below 100 (not being immune). If these conditions are met upon inflictions, the attacker gets inflicted with the same condition. The scheme of the infliction may vary and this column tells how it's inflicted
- Other effects: Anything the infliction does other than inflicting the condition or giving it to the attacker due to `StatusMirroe`. Please note that with the exception of the `Sleep` property, [RemoveCondition](../Actors%20states/Conditions%20methods/RemoveCondition.md) is called with the target to remove its `Sleep` [condition](../Actors%20states/Conditions.md) if one of the following is true:
- The target is an enemy party member. NOTE: This contradicts the requirements for [DoDamage](DoDamage.md) to do the same because it does not feature a clause for dealing damages above 0
- The target is an enemy party member. NOTE: This contradicts the requirements for [DoDamage](DoDamage.md) to do the same because it does not feature a clause for dealing damages above 0. This means that a an attack that does no damage, but still inflicts can remove [Sleep](../Actors%20states/BattleCondition/Sleep.md) without changing the `cantmove` which is different than if DoDamage removed it.
- The target is a player party member and it doesn't have a `HeavySleeper` [medal](../../Enums%20and%20IDs/Medal.md)
|property|[conditions](../Actors%20states/Conditions.md#conditions) inflicted|Requirements|Resistance increase|`StatusMirror` Infliction scheme|Other effects|

View File

@@ -260,10 +260,10 @@ If the target is a player party member with an `hp` of 0 (meaning it just died a
### Target waking up
This section only applies if all of the following is true:
- The target has the `Sleep` [condition](../Actors%20states/Conditions.md)
- The target had the `Sleep` [condition](../Actors%20states/Conditions.md) at the start of the method
- The property isn't `Sleep`
- target.`hp` is above 0
- The final damage amount calculated earlier is above 0. NOTE: [CalculateBaseDamage](CalculateBaseDamage.md) may override this if the property is one of the status infliction one (except `Flip`) and the infliction occured because this clause isn't part of the damage calculation
- The final damage amount calculated earlier is above 0. NOTE: [CalculateBaseDamage](CalculateBaseDamage.md) may override this if the property is one of the status infliction one (except `Flip`) and the infliction occured because this clause isn't part of the damage calculation. This means that if the amount is 0, but an infliction removing `Sleep` occured, the `cantmove` won't change which is a different logic than this method enforces
- There was no `DamageOverride` of `DontAwake` processed earlier
- If the target is an player party member, the `HeavySleeper` [medal](../../Enums%20and%20IDs/Medal.md) must not be equipped

View File

@@ -22,10 +22,10 @@ The asset contains one line per [enemy](../Enums%20and%20IDs/Enemies.md) whose i
|5|cursoroffset.x|float|The x component of the offset to apply to the selection cursor upon targeting the enemy|
|6|cursoroffset.y|float|The y component of the offset to apply to the selection cursor upon targeting the enemy|
|7|cursoroffset.z|float|The z component of the offset to apply to the selection cursor upon targeting the enemy|
|8|poisonres|int|The poison resistance of the enemy|
|9|freezeres|int|The freeze resistance of the enemy|
|10|numbres|int|The numb resistance of the enemy|
|11|sleepres|int|The sleep resistance of the enemy|
|8|poisonres|int|The base [poison](../Battle%20system/Actors%20states/BattleCondition/Poison.md) resistance of the enemy|
|9|freezeres|int|The base [freeze](../Battle%20system/Actors%20states/BattleCondition/Freeze.md) resistance of the enemy|
|10|numbres|int|The base [numb](../Battle%20system/Actors%20states/BattleCondition/Numb.md) resistance of the enemy|
|11|sleepres|int|The base [sleep](../Battle%20system/Actors%20states/BattleCondition/Sleep.md) resistance of the enemy|
|12|size|float|The width of the enemy used for calculating positioning|
|13|battleentity.freezesize.x|float|The x component of the ice cube size when the entity is frozen|
|14|battleentity.freezesize.y|float|The y component of the ice cube size when the entity is frozen|
@@ -33,36 +33,36 @@ The asset contains one line per [enemy](../Enums%20and%20IDs/Enemies.md) whose i
|16|battleentity.freezeoffset.x|float|The x component of the ice cube offset from the entity's center when the entity is frozen|
|17|battleentity.freezeoffset.y|float|The y component of the ice cube offset from the entity's center when the entity is frozen|
|18|battleentity.freezeoffset.z|float|The z component of the ice cube offset from the entity's center when the entity is frozen|
|19|position|BattlePosition (string or int)|The battle position of the enemy on the battle field (`Random` has special logic, see the special fields logic section below for details)|
|20|battleentity.height|float|The `height` of the entity, If the `position` is `Flying` and the value is below 2.0, it is overriden to 2.0|
|19|[position](../Battle%20system/Actors%20states/BattlePosition.md)|`BattlePosition` (string or int)|The starting battle position of the enemy on the battle field (`Random` has special logic, see the special fields logic section below for details)|
|20|battleentity.height|float|The `height` of the entity, If the [position](../Battle%20system/Actors%20states/BattlePosition.md) is `Flying` and the value is below 2.0, it is overriden to 2.0|
|21|battleentity.bobspeed|float|The `bobspeed` of the entity|
|22|battleentity.bobrange|float|The `bobrange` of the entity|
|23|weakness|`{` separated list of AttackProperty (int or string)|The list of [AttackProperty](../Battle%20system/Damage%20pipeline/AttackProperty.md)|
|24|weight|float|???|
|25|Base [Enemy](../Enums%20and%20IDs/Enemies.md) id (loaded as animid)|int|The [Enemy](../Enums%20and%20IDs/Enemies.md) id that this is a variant of (see the section below about enemy variant for details), can be omitted by putting any negative number|
|26|eventondeath|int|The EventDialogue to trigger when the enemy dies ???|
|27|moves|int|The amount of actions the enemy has normally each turn during the enemy phase|
|28|notaunt|bool|Tells if the enemy can't be taunted ???|
|29|cantfall|bool|Tells if the enemy cannot fall ???|
|23|[weakness](../Battle%20system/Actors%20states/Enemy%20features.md#weakness)|`{` separated list of AttackProperty (int or string)|The list of [AttackProperty](../Battle%20system/Damage%20pipeline/AttackProperty.md) that applies to this enemy|
|24|[weight](../Battle%20system/Actors%20states/Enemy%20features.md#weight)|float|A visual modifier that controls if and how much the enemy can get launched if attacked, should be between 0.0 (furthest launch) and 100.0 (no launch)|
|25|Base [Enemy](../Enums%20and%20IDs/Enemies.md) id (loaded as animid)|int|The [Enemy](../Enums%20and%20IDs/Enemies.md) id that this is a variant of (see the section below about enemy variant for details), can be omitted if it's a negative number|
|26|[eventondeath](../Battle%20system/Actors%20states/Enemy%20features.md#eventondeath)|int|The [EventDialogue](../Battle%20system/Battle%20flow/EventDialogue.md) to trigger when the enemy dies as detected by [CheckDead](../Battle%20system/Battle%20flow/Action%20coroutines/CheckDead.md), can be ommited if it's -1|
|27|[moves](../Battle%20system/Actors%20states/Enemy%20features.md#moves)|int|The amount of actor turn the enemy has normally each main turn during the [enemy phase](../Battle%20system/Battle%20flow/Main%20turn%20life%20cycle.md#enemy-phase)|
|28|[notaunt](../Battle%20system/Actors%20states/Enemy%20features.md#notaunt)|bool|Tells if the enemy can't receive the [Taunted](../Battle%20system/Actors%20states/BattleCondition/Taunted.md) condition by using the `Taunt` [skill](../Enums%20and%20IDs/Skills.md)|
|29|[cantfall](../Battle%20system/Actors%20states/Enemy%20features.md#cantfall)|bool|Tells if the enemy cannot drop or have its [position](../Battle%20system/Actors%20states/BattlePosition.md) set to `Ground`|
|30|fixedexp|bool|Tells if the exp field should not be scaled and is a fixed number (see the section below about EXP for details)|
|31|notired|bool|???|
|32|hidehp|bool|Tells if the HP of the enemy should always be hidden even after spying|
|33|deathtype|int|The manner in which the enemy dies (This isn't a DeathType, more on the [deathtype](../Battle%20system/Actors%20states/Enemy%20features.md#deathtype) documentation)|
|34|chargeonotherenemy|`;` separated list of int or `-1` or empty|The list of [enemy](../Enums%20and%20IDs/Enemies.md) ids that will cause this enemy to perform a `hitaction` when any enemy id in that list takes damages in the player phase. See the special fields logic section below for more details on which format gives what value|
|31|[notired](../Battle%20system/Actors%20states/Enemy%20features.md#notired)|bool|Tells if exhaution increases won't happen if they were set to happen normally (with caveats, check the documentation of the feature to learn more)|
|32|[hidehp](../Battle%20system/Actors%20states/Enemy%20features.md#hidehp)|bool|Tells if the `hp` and `def` stats of the enemy should not be shown even after spying|
|33|[deathtype](../Battle%20system/Actors%20states/Enemy%20features.md#deathtype)|int|The manner in which the enemy dies (This isn't a `DeathType`, more on the feature's documentation)|
|34|[chargeonotherenemy](../Battle%20system/Actors%20states/Enemy%20features.md#chargeonotherenemy)|`;` separated list of int or `-1` or empty|The list of [enemy](../Enums%20and%20IDs/Enemies.md) ids that will cause this enemy to perform a [hitaction](../Battle%20system/Actors%20states/Enemy%20features.md#hitaction) when any enemy id in that list takes damages in the player phase. See the feature's documentation to learn more. This field also has special loading logic, check the section below for more details|
|35|hardatk|int|The amount to increase the attack on Hard Mode or EX (see the section below about difficulty scaling for details). Not loaded if the hard difficulty scaling doesn't apply and the value remains at 0|
|36|<No field>|int|The base amount to increase the max HP on Hard Mode, EX or HARDEST (this is NOT `hardhp` which stays at 0 and is unused). See the section below about difficulty scaling for details|
|37|<No field>|int|The base amount to increase the defense on Hard Mode, EX or HARDEST (this is NOT `hardef` which stays at 0 and is unused). See the section below about difficulty scaling for details|
|38|defenseonhit|int|The amount to increase the defense on hit ???|
|36|<No field>|int|The base amount to increase the max HP on Hard Mode, EX or HARDEST (this is NOT `hardhp` which stays at 0 and is UNUSED). See the section below about difficulty scaling for details|
|37|<No field>|int|The base amount to increase the defense on Hard Mode, EX or HARDEST (this is NOT `hardef` which stays at 0 and is UNUSED). See the section below about difficulty scaling for details|
|38|[defenseonhit](../Battle%20system/Actors%20states/Enemy%20features.md#defenseonhit-and-isdefending)|int|The amount of point of defenses granted to the enemy when `isdefending` is true (check the feature's documentation to learn more)|
|39|itemoffset.x|float|The x component of the offset to render an item relative to the enemy|
|40|itemoffset.y|float|The y component of the offset to render an item relative to the enemy|
|41|itemoffset.z|float|The z component of the offset to render an item relative to the enemy|
|42|<No field>|bool|If true, the `battleentity.basestate` is set to 13 (`BattleIdle`)|
|42|<No field>|bool|If true, the battleentity.`basestate` is set to 13 (`BattleIdle`)|
|43|Portrait sprite index|int|Index of the sprite in `Sprites/Items/EnemyPortraits` (if this is negative, this defaults to the enemy id, see the section below about this for more details)|
|44|notattle|bool|Tells if the enemy is not spy-able (this can be overriden to true, see the section about special fields logic for details)|
|45|eventonfall|int|The EventDialogue to trigger when the enemy falls ???|
|46|onhitaction|int|If 1, the enemy will process a `hitaction` when hit. If 2, it will only when its `position` is `Flying` and if 3, it will only when its `position` is `Ground`|
|47|actimmobile|bool|???|
|48|sizeonfreeze|float|The size of the enemy on freeze. If the value is less than 0.1, it is be overriden to `size` + 0.25. More details at [sizeonfreeze](../Battle%20system/Actors%20states/Enemy%20features.md#sizeonfreeze) documentation|
|44|[notattle](../Battle%20system/Actors%20states/Enemy%20features.md#notattle)|bool|Tells if the enemy is not spy-able. Check the feature's documentation for more details. This fields also has special loading logic that can override it to true, check the section below for more detials|
|45|[eventonfall](../Battle%20system/Actors%20states/Enemy%20features.md#eventonfall)|int|The [EventDialogue](../Battle%20system/Battle%20flow/EventDialogue.md) to trigger when the enemy drops, can be ommited if it's -1|
|46|[onhitaction](../Battle%20system/Actors%20states/Enemy%20features.md#onhitaction)|int|If 1, the enemy will process a [hitaction](../Battle%20system/Actors%20states/Enemy%20features.md#hitaction) when hit. If 2, it will only when its [position](../Battle%20system/Actors%20states/BattlePosition.md) is `Flying` and if 3, it will only when its `position` is `Ground`|
|47|[actimmobile](../Battle%20system/Actors%20states/Enemy%20features.md#actimmobile)|bool|Prevent `cantmove` to be anything higher than 0 or [IsStopped](../Battle%20system/Actors%20states/IsStopped.md) to return true as a result of being inflicted with a stopping [condition](../Battle%20system/Actors%20states/Conditions.md). This works for most, but not all cases, check the feature's documentation to learn more|
|48|[sizeonfreeze](../Battle%20system/Actors%20states/Enemy%20features.md#sizeonfreeze)|float|The size of the enemy on freeze. If the value is less than 0.1, it is be overriden to `size` + 0.25, check the feature's documentation to learn more|
The data will be loaded by into `enemydata[id, x]`, where `id` is the [enemy](../Enums%20and%20IDs/Enemies.md) id and `x` is the loaded index. On the pause menu, every lines is loaded into `enemydata` all at once, but the meanings do not change.