Android build v1.1.37
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "com.warren.iwanttoheal"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 117
|
||||
versionName "1.1.36"
|
||||
versionCode 118
|
||||
versionName "1.1.37"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -48,6 +48,7 @@ import {
|
||||
import { createIwt2PvpNormalizedGearProgress } from '../content/pvpGearNormalization'
|
||||
|
||||
type ArenaStatus = 'playing' | 'paused' | 'victory' | 'defeat'
|
||||
type PvpResultReason = 'opponent-defeated' | null
|
||||
type OverlayAction = 'primary' | 'requeue' | 'menu'
|
||||
type OverlayNavEntry = {
|
||||
action: OverlayAction
|
||||
@@ -143,6 +144,7 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save,
|
||||
))
|
||||
const [abilityCooldowns, setAbilityCooldowns] = useState<Record<string, number>>({})
|
||||
const [status, setStatus] = useState<ArenaStatus>('playing')
|
||||
const [pvpResultReason, setPvpResultReason] = useState<PvpResultReason>(null)
|
||||
const [selectedOverlayAction, setSelectedOverlayAction] = useState<OverlayAction>('primary')
|
||||
const [selectedPartyId, setSelectedPartyId] = useState<Iwt2EntityId>('player-healer')
|
||||
const [dropAwards, setDropAwards] = useState<Iwt2BossDropAward[]>([])
|
||||
@@ -226,16 +228,19 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save,
|
||||
setDropAwards([])
|
||||
setPetAwards([])
|
||||
setSelectedOverlayAction('primary')
|
||||
setPvpResultReason(null)
|
||||
setStatus('playing')
|
||||
}, [activeGearProgress, arenaBounds, bossId, bossIds, combinedBossHealthScale, combinedDamageScale, pvpRoguelike, roguelikeBuffs, roguelikeContentType, roguelikeStage])
|
||||
|
||||
const showOverlay = useCallback((nextStatus: Exclude<ArenaStatus, 'playing'>) => {
|
||||
const showOverlay = useCallback((nextStatus: Exclude<ArenaStatus, 'playing'>, nextPvpResultReason: PvpResultReason = null) => {
|
||||
setSelectedOverlayAction('primary')
|
||||
setPvpResultReason(nextPvpResultReason)
|
||||
statusRef.current = nextStatus
|
||||
setStatus(nextStatus)
|
||||
}, [])
|
||||
|
||||
const resumeArena = useCallback(() => {
|
||||
setPvpResultReason(null)
|
||||
statusRef.current = 'playing'
|
||||
setStatus('playing')
|
||||
}, [])
|
||||
@@ -336,7 +341,7 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save,
|
||||
return
|
||||
}
|
||||
if (action === 'back') {
|
||||
if (statusRef.current === 'paused') resumeArena()
|
||||
if (device === 'pc' && statusRef.current === 'paused') resumeArena()
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -421,15 +426,21 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save,
|
||||
onSaveUpdated(updatedSave)
|
||||
}
|
||||
|
||||
if (next.bosses.every((boss) => boss.health <= 0)) {
|
||||
if (pvpRoguelike && roguelikeRun) {
|
||||
const playerCleared = next.bosses.every((boss) => boss.health <= 0)
|
||||
const playerDefeated = next.party.every((member) => member.health <= 0)
|
||||
const opponentCleared = Boolean(nextOpponentState?.bosses.every((boss) => boss.health <= 0))
|
||||
const opponentDefeated = Boolean(nextOpponentState?.party.every((member) => member.health <= 0))
|
||||
if (!pvpRoguelike && playerCleared) {
|
||||
showOverlay('victory')
|
||||
} else if (pvpRoguelike && playerDefeated) {
|
||||
showOverlay('defeat')
|
||||
} else if (pvpRoguelike && playerCleared && opponentDefeated) {
|
||||
showOverlay('victory', 'opponent-defeated')
|
||||
} else if (pvpRoguelike && playerCleared && opponentCleared && roguelikeRun) {
|
||||
statusRef.current = 'victory'
|
||||
setStatus('victory')
|
||||
roguelikeRun.onVictory()
|
||||
} else {
|
||||
showOverlay('victory')
|
||||
}
|
||||
} else if (next.party.every((member) => member.health <= 0)) {
|
||||
} else if (!pvpRoguelike && playerDefeated) {
|
||||
showOverlay('defeat')
|
||||
}
|
||||
|
||||
@@ -465,7 +476,9 @@ export function BossArenaScreen({ bossId, bossIds, difficulty, modeLabel, save,
|
||||
? 'Rematch'
|
||||
: 'Restart'
|
||||
const overlayTitle = status === 'victory'
|
||||
? `${bossTitle} Down`
|
||||
? pvpResultReason === 'opponent-defeated'
|
||||
? 'CPU Rival Falls'
|
||||
: `${bossTitle} Down`
|
||||
: status === 'defeat'
|
||||
? 'Party Defeated'
|
||||
: 'Arena Paused'
|
||||
|
||||
Reference in New Issue
Block a user