mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-14 17:12:59 -07:00
Feature: Crowd Control Integration (#1568)
* Start effects * Disable input to game when typing in console * Add gravity support * noUI placeholder * Add rest of effects to console * Remove z_play code * Add rupee modification * Add OneHit KO (#27) * few fix and paper Link * Better method and now use the reset flag * Revert "Better method and now use the reset flag" This reverts commit2aafcc1df2
. * Revert "few fix and paper Link" This reverts commit65e76dcfee
. * Paper Link & few fixes (#28) * Implement pacifist mode (#30) * Implement cucco storm (#31) * Add no UI functionality (#32) * Enable CrowdControl on windows (#33) * Use std::format and implement wallmaster * Implement defense modifier * Implement no_z and clean up * Implement reverse controls * Some fixes while testing CC connection * Implement speed modifier and fix defese modifier * Fail magic effects if magic is not acquired * Fix queue system * Implement rainstorm * Some cleanup * Use IS_ZERO to handle very low near zero values * Split some effects * Fix emptying magic * Don’t run cucco on pre-rendered backgrounds * Use correct method for updating ruppees * Fix decreasing speed * Remove old SDL stuff * Remove old fixes * Enable Crowd Control for both debug and release * Add missing returns * Cleanup event firing * Further clean up on event firing * Fix some bugs * CC fixes and enemy spawning (#35) * Fix icetraps * Fix title screen * Fix pause screen * Fix death screen timer & Code cleanup * Fix timer during textboxes * Code cleanup * Add: Multiple enemy spawning * More enemies + more code cleanup (#36) * Enums for returning effect states * Add more enemies * Update CrowdControl.cpp * Remove enums from enemies * Fix up flow for events (#37) # Conflicts: # soh/soh/Enhancements/crowd-control/CrowdControl.cpp * Fix spawn position of likelike * CC temp enemy fixes (#38) * Check for pause in pacifist and allow button presses (#39) * Fix Pacifist mode (#41) * First attempt pacifier fix * Real fix for pacifist mode * Comment * Remove cutscene and long delay from cucco_storm (#40) * Some PR Fixes * Use standard types * Handle JSON parsing error and free memory * Add CC configuration file * Add: Giving deku shield option. Fix: Giant Lonk (#42) * Small stalfos fix (#43) * Syntax Improvements (#44) * Revert bools to uint32_t * Add comment about bools * Fix cucco storm, fix empty heart (#45) * Protect commands vector with mutex * prefix effects with chaosEffect (#46) Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
parent
87125ae334
commit
083ceb4423
18 changed files with 1531 additions and 47 deletions
|
@ -11,6 +11,8 @@
|
|||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#include "soh/Enhancements/debugconsole.h"
|
||||
|
||||
|
||||
static uint16_t _doActionTexWidth, _doActionTexHeight = -1;
|
||||
static uint16_t DO_ACTION_TEX_WIDTH() {
|
||||
|
@ -935,7 +937,11 @@ void func_80083108(GlobalContext* globalCtx) {
|
|||
Interface_ChangeAlpha(50);
|
||||
}
|
||||
} else if (msgCtx->msgMode == MSGMODE_NONE) {
|
||||
if ((func_8008F2F8(globalCtx) >= 2) && (func_8008F2F8(globalCtx) < 5)) {
|
||||
if (chaosEffectPacifistMode) {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] =
|
||||
gSaveContext.buttonStatus[7] = gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
} else if ((func_8008F2F8(globalCtx) >= 2) && (func_8008F2F8(globalCtx) < 5)) {
|
||||
if (gSaveContext.buttonStatus[0] != BTN_DISABLED) {
|
||||
sp28 = 1;
|
||||
}
|
||||
|
@ -2913,6 +2919,15 @@ s32 Health_ChangeBy(GlobalContext* globalCtx, s16 healthChange) {
|
|||
osSyncPrintf("***** 増減=%d (now=%d, max=%d) ***", healthChange, gSaveContext.health,
|
||||
gSaveContext.healthCapacity);
|
||||
|
||||
// If one-hit ko mode is on, any damage kills you and you cannot gain health.
|
||||
if (chaosEffectOneHitKO) {
|
||||
if (healthChange < 0) {
|
||||
gSaveContext.health = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
if (healthChange > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4,
|
||||
&D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
@ -2922,6 +2937,14 @@ s32 Health_ChangeBy(GlobalContext* globalCtx, s16 healthChange) {
|
|||
}
|
||||
// clang-format on
|
||||
|
||||
if (chaosEffectDefenseModifier != 0 && healthChange < 0) {
|
||||
if (chaosEffectDefenseModifier > 0) {
|
||||
healthChange /= chaosEffectDefenseModifier;
|
||||
} else {
|
||||
healthChange *= abs(chaosEffectDefenseModifier);
|
||||
}
|
||||
}
|
||||
|
||||
gSaveContext.health += healthChange;
|
||||
|
||||
if (gSaveContext.health > gSaveContext.healthCapacity) {
|
||||
|
@ -2956,6 +2979,10 @@ void Health_GiveHearts(s16 hearts) {
|
|||
gSaveContext.healthCapacity += hearts * 0x10;
|
||||
}
|
||||
|
||||
void Health_RemoveHearts(s16 hearts) {
|
||||
gSaveContext.healthCapacity -= hearts * 0x10;
|
||||
}
|
||||
|
||||
void Rupees_ChangeBy(s16 rupeeChange) {
|
||||
gSaveContext.rupeeAccumulator += rupeeChange;
|
||||
}
|
||||
|
@ -3022,7 +3049,7 @@ void Inventory_ChangeAmmo(s16 item, s16 ammoChange) {
|
|||
void Magic_Fill(GlobalContext* globalCtx) {
|
||||
if (gSaveContext.magicAcquired) {
|
||||
gSaveContext.unk_13F2 = gSaveContext.unk_13F0;
|
||||
gSaveContext.unk_13F6 = (gSaveContext.doubleMagic * 0x30) + 0x30;
|
||||
gSaveContext.unk_13F6 = (gSaveContext.doubleMagic + 1) * 0x30;
|
||||
gSaveContext.unk_13F0 = 9;
|
||||
}
|
||||
}
|
||||
|
@ -4739,6 +4766,10 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
s16 svar6;
|
||||
bool fullUi = !CVar_GetS32("gMinimalUI", 0) || !R_MINIMAP_DISABLED || globalCtx->pauseCtx.state != 0;
|
||||
|
||||
if (chaosEffectNoUI) {
|
||||
return;
|
||||
}
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
// Invalidate Do Action textures as they may have changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue