diff --git a/IWantToHeal-Thor-v1.1.29.apk b/IWantToHeal-Thor-v1.1.29.apk deleted file mode 100644 index 70a9fac..0000000 Binary files a/IWantToHeal-Thor-v1.1.29.apk and /dev/null differ diff --git a/IWantToHeal-Thor-v1.1.30.apk b/IWantToHeal-Thor-v1.1.30.apk deleted file mode 100644 index 7cefa2a..0000000 Binary files a/IWantToHeal-Thor-v1.1.30.apk and /dev/null differ diff --git a/IWantToHeal-Thor-v1.1.31.apk b/IWantToHeal-Thor-v1.1.31.apk deleted file mode 100644 index ca6b18c..0000000 Binary files a/IWantToHeal-Thor-v1.1.31.apk and /dev/null differ diff --git a/IWantToHeal-Thor-v1.1.32.apk b/IWantToHeal-Thor-v1.1.33.apk similarity index 94% rename from IWantToHeal-Thor-v1.1.32.apk rename to IWantToHeal-Thor-v1.1.33.apk index 2c55281..c4ec986 100644 Binary files a/IWantToHeal-Thor-v1.1.32.apk and b/IWantToHeal-Thor-v1.1.33.apk differ diff --git a/android/app/build.gradle b/android/app/build.gradle index fe906c1..64be3c1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.warren.iwanttoheal" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 113 - versionName "1.1.32" + versionCode 114 + versionName "1.1.33" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/src/modes/iwt2/content/pvpGearNormalization.ts b/src/modes/iwt2/content/pvpGearNormalization.ts new file mode 100644 index 0000000..e450a7a --- /dev/null +++ b/src/modes/iwt2/content/pvpGearNormalization.ts @@ -0,0 +1,34 @@ +import { IWT2_PARTY_ORDER } from './classes' +import { + IWT2_GEAR_SLOTS, + type Iwt2GearLevel, + type Iwt2GearProgress, +} from './gear' + +export type Iwt2PvpGearNormalizationConfig = { + enabled: boolean + gearLevel: Iwt2GearLevel +} + +export const IWT2_PVP_GEAR_NORMALIZATION: Iwt2PvpGearNormalizationConfig = { + enabled: true, + gearLevel: 5, +} + +export function createIwt2PvpNormalizedGearProgress( + config = IWT2_PVP_GEAR_NORMALIZATION, +): Iwt2GearProgress | undefined { + if (!config.enabled) return undefined + + return Object.fromEntries( + IWT2_PARTY_ORDER.map((classId) => [ + classId, + { + slots: Object.fromEntries( + IWT2_GEAR_SLOTS.map((slotId) => [slotId, { level: config.gearLevel }]), + ), + infusionAbilityId: null, + }, + ]), + ) as Iwt2GearProgress +} diff --git a/src/modes/iwt2/screens/BossArenaScreen.tsx b/src/modes/iwt2/screens/BossArenaScreen.tsx index b6929ff..bf96703 100644 --- a/src/modes/iwt2/screens/BossArenaScreen.tsx +++ b/src/modes/iwt2/screens/BossArenaScreen.tsx @@ -45,6 +45,7 @@ import { IWT2_BARKSKIN_HOT_BONUS_BUFF_ID, IWT2_SUN_WARD_DAMAGE_REDUCTION_BUFF_ID, } from '../content/roguelike' +import { createIwt2PvpNormalizedGearProgress } from '../content/pvpGearNormalization' type ArenaStatus = 'playing' | 'paused' | 'victory' | 'defeat' type OverlayAction = 'primary' | 'requeue' | 'menu' @@ -92,7 +93,12 @@ type BossArenaScreenProps = { export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save, onBack, onMainMenu, onPvpRequeue, onSaveUpdated, roguelikeRun }: BossArenaScreenProps) { const bossMetadata = IWT2_BOSS_METADATA[bossId] const pvpRoguelike = roguelikeRun?.variant === 'pvp' - const pveGearActive = roguelikeRun?.variant !== 'pvp' + const pvpNormalizedGearProgress = useMemo(() => createIwt2PvpNormalizedGearProgress(), []) + const activeGearProgress = pvpRoguelike + ? pvpNormalizedGearProgress + : roguelikeRun?.variant !== 'pvp' + ? save.gearProgress + : undefined const bossHealthScale = roguelikeRun ? roguelikeBossHealthScale(roguelikeRun.stage) : 1 const difficultyHealthScale = difficulty?.healthMultiplier ?? 1 const difficultyDamageScale = difficulty?.damageMultiplier ?? 1 @@ -115,17 +121,19 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save, combinedDamageScale, roguelikeBuffs, createPressureState(roguelikeStage, roguelikeContentType), - pveGearActive ? save.gearProgress : undefined, + activeGearProgress, arenaBounds, )) const [opponentArenaState, setOpponentArenaState] = useState(() => ( pvpRoguelike - ? createInitialIwt2ArenaState( + ? createArenaState( bossId, bossIds, combinedBossHealthScale, combinedDamageScale, + EMPTY_ROGUELIKE_BUFFS, createPressureState(roguelikeStage, roguelikeContentType), + activeGearProgress, arenaBounds, ) : null @@ -189,16 +197,18 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save, combinedDamageScale, roguelikeBuffs, pressureState, - pveGearActive ? save.gearProgress : undefined, + activeGearProgress, arenaBounds, ) const nextOpponentState = pvpRoguelike - ? createInitialIwt2ArenaState( + ? createArenaState( bossId, bossIds, combinedBossHealthScale, combinedDamageScale, + EMPTY_ROGUELIKE_BUFFS, pressureState, + activeGearProgress, arenaBounds, ) : null @@ -214,7 +224,7 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save, setPetAwards([]) setSelectedOverlayAction('primary') setStatus('playing') - }, [arenaBounds, bossId, bossIds, combinedBossHealthScale, combinedDamageScale, pveGearActive, pvpRoguelike, roguelikeBuffs, roguelikeContentType, roguelikeStage, save.gearProgress]) + }, [activeGearProgress, arenaBounds, bossId, bossIds, combinedBossHealthScale, combinedDamageScale, pvpRoguelike, roguelikeBuffs, roguelikeContentType, roguelikeStage]) const showOverlay = useCallback((nextStatus: Exclude) => { setSelectedOverlayAction('primary') @@ -231,10 +241,10 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save, () => { const baseAbilities = abilitiesForHealer( save.character.healerStyle, - pveGearActive ? save.gearProgress.healer.infusionAbilityId : null, + activeGearProgress?.healer.infusionAbilityId ?? null, ) - const gearAbilities = pveGearActive - ? applyIwt2PveGearToHealerAbilities(baseAbilities, save.gearProgress) + const gearAbilities = activeGearProgress + ? applyIwt2PveGearToHealerAbilities(baseAbilities, activeGearProgress) : baseAbilities return applyRoguelikeModifiers( gearAbilities, @@ -242,7 +252,7 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save, roguelikeRun?.debuffs ?? [], ) }, - [pveGearActive, roguelikeRun?.buffs, roguelikeRun?.debuffs, save.character.healerStyle, save.gearProgress], + [activeGearProgress, roguelikeRun?.buffs, roguelikeRun?.debuffs, save.character.healerStyle], ) const castAbility = useCallback((ability: Iwt2HealerAbility) => {