11 KiB
11 KiB
Update: Special Effect Constants
src/constants.jsnow exportsSPECIAL_EFFECTfor the special projectile system, whileWORLD_EFFECT.SPECIALreferences the same object for world-effect domain grouping.SPECIAL_EFFECT.TRIGGER_DELAY_MIN_MS,TRIGGER_DELAY_MAX_MS, andRETRY_DELAY_MScontrol the once-per-match activation window.SPECIAL_EFFECT.CASTER,CAMERA,MELEE, andPROJECTILEcentralize the Hurt-frame pose, non-magic caster type balancing, caster invulnerability time, caster-start centering, zoom timing, projectile-view zoom-out timing, melee projectile frame sequences/looping assets, projectile start hold, size, speed, target density area, arena edge padding, hit radius, travel distance, and lifetime.SPECIAL_EFFECT.FOCUS_LAYERcontrols the temporary caster-emphasis stack: blurred battlefield snapshot depth/alpha, dim depth/alpha, caster depth, Blur FX quality/strength/steps, and fade timing.
Update: Large-Battle Render Budget
PERFORMANCE.LARGE_BATTLE_RENDERED_FIGHTER_LIMITcaps the number of physical fighter plans produced for large battles.matchSetup.jsapplies the budget after randomized elite compression by promoting normal 100-member blocks or normal remainder groups to elite groups as needed. It does not change representedstackCountpopulation.
Update: Large-Battle Elite Probability
FIGHTER.ELITE.RANDOMIZED_COMPRESSION.LARGE_BATTLE_ELITE_BLOCK_PROBABILITYcontrols the randomized elite block ratio once the user-entered total fighter count exceedsPERFORMANCE.LARGE_BATTLE_FIGHTER_THRESHOLD.matchSetup.jskeeps the threshold underPERFORMANCEand the elite ratio underFIGHTER.ELITE, so performance detection and elite balancing remain separately tunable.
Update: Elite Magic Attack Effect Scale
FIGHTER.ATTACK_EFFECT_SCALE_MULTIPLIERcontrols normal instant-spell attack effect size.FIGHTER.ELITE.ATTACK_EFFECT_SCALE_MULTIPLIERapplies only to elite magic fighters, multiplying the normal spell-effect scale without changing body scale, HP, range, or damage formulas.- Elite skin selection uses the full
FIGHTER.ELITE.TYPElist, currentlymeleeandmagic.
Update: Elite Balance Constants
FIGHTER.ELITEcontains elite type, stack/appearance/HP/range tuning, attack-damage and speed tuning, and randomized large-team compression settings inside the fighter domain.COMBAT.CRITICAL_DAMAGE_PERCENTsets elite critical damage from target max HP, whileCOMBAT.NORMAL_CRITICAL_DAMAGE_MULTIPLIERreplaces normal-fighter instant critical kills with multiplied attack damage.COMBAT.ELITE_KILL_SPLASH_ENABLED,ELITE_KILL_SPLASH_DAMAGE_PERCENT,ELITE_KILL_SPLASH_RADIUS, andELITE_KILL_SPLASH_CHAIN_ENABLEDtune the elite-only on-kill area damage centered on the killed fighter.COMBAT.KILL_REWARD_ENABLEDisfalseby default because one compressed kill is not equivalent to one represented casualty. The legacy heal/growth constants remain available only for an explicitly re-enabled mode.WORLD_EFFECT.METEOR_DAMAGE_PERCENTandWORLD_EFFECT.FROST_DAMAGE_PERCENTapply only to elite targets. Existing fixedMETEOR_DAMAGEandFROST_DAMAGEremain the normal-target values.ATTACK_DAMAGE_*,ATTACK_SPEED_*, andMOVE_SPEED_*constants control elite stack bonuses. For each bonus, multiplier0removes the added bonus and multiplier1applies the configured stack exponent fully.
Context: Core & Infrastructure
Update: Dense-Area Meteor Barrage
WORLD_EFFECT.AREA_TILESnow defines the large warning/search square selected from the densest living-fighter region.WORLD_EFFECT.WARNING_DURATION_MScontrols how long that large warning marker stays visible without changing the scheduled strikes.WORLD_EFFECT.IMPACT_AREA_TILES,IMPACT_COUNT_MIN,IMPACT_COUNT_MAX,IMPACT_STAGGER_MS, andIMPACT_VISUAL_SCALEconfigure the smaller strikes fired inside that warning square.WORLD_EFFECT.SIZE_SCALE_VARIANCErandomizes each fire/frost impact around the smaller strike size.WORLD_EFFECT.INTERVALschedules the first barrage after match start, andWORLD_EFFECT.REPEAT_INTERVALschedules later normal barrages.- Meteor impact shake strength follows the same size multiplier, using
WORLD_EFFECT.METEOR_SHAKE_DURATION_MSandWORLD_EFFECT.METEOR_SHAKE_INTENSITYas base values.
Update: Direct Fighter Counts And Match Cap
- Live-match name entries use the
name*Nsuffix as the assigned fighter count; a name without*Ncreates one assigned fighter. SPAWN.MAX_FIGHTER_COUNTis the maximum for participant-assigned fighter slots and is currently 8,000; Slime trait-generated fighters are excluded.- Limit failures during live-match setup are surfaced beneath the participant nickname input.
SPAWN.FIGHTERS_PER_STARTING_ZONEcontrols starting-zone distribution; each additional block of that many assigned fighters adds a team zone.
Update: Performance Constants
src/constants.jsnow exportsPERFORMANCEfor large-battle tuning: fighter threshold, target grid size, HUD pool/candidate limits, graphics minimap settings, and large-battle dead despawn delay.- Keep large-battle behavior switches tied to
PERFORMANCE.LARGE_BATTLE_FIGHTER_THRESHOLDso high-count match tuning stays centralized.
Update: Dead Fighter Despawn Constant
FIGHTER.DEAD_DESPAWN_DELAY_MScontrols how long a dead fighter fades before disappearing;FIGHTER.DEAD_DESPAWN_ALPHAcontrols the fade target.
1. 모듈별 상세 역할
src/main.js: Phaser 게임의 전역 설정(Physics, Scale, Canvas Parent)을 담당하며,ArenaScene을 인스턴스화합니다.- 앱 로드 시
trackVisitor()를 호출해 방문자 체크 API와 연동합니다. Start버튼, 옵션 drawer, 전투 시작 submit 흐름을 제어하며 전투 시작 시#app에match-live상태 클래스를 부여합니다.- 전투 중 drawer 접기/펼치기(
drawer-collapsed), 재시작 버튼, 일시정지 버튼 상태(match-paused)를 DOM 클래스와ArenaScene상태에 동기화합니다.
- 앱 로드 시
src/constants.js: 게임 내 모든 튜닝 수치를 관리합니다.FIGHTER_TYPE_STATS:melee,ranged,magic별 최대 체력, 이동속도, 사거리, 쿨다운, 피해량, 치명타 및 공격 발동 지연 기본값.FIGHTER_HITBOX_*: 100x100 캐릭터 프레임 안에서 실제 충돌 판정이 놓이는 위치와 크기.KILL_REWARD_ENABLED,KILL_HEALTH_RECOVERY_RATIO,KILL_GROWTH_MULTIPLIER,KILL_GROWTH_MAX_MULTIPLIER: 기본적으로 비활성화된 처치 보너스 토글과, 명시적으로 재활성화할 때 사용하는 회복/성장 값.WORLD_EFFECT.*: 첫/반복 포격 간격, 밀집 경고 범위, 개별 탄착 범위/발수/시각 배율, 대각선 낙하 거리, normal 고정 화염/냉기 피해량, elite 최대 체력 비례 화염/냉기 피해량, 냉기 동결 시간/색상, 냉각지대 지속시간과 감속 배율.SELECTED_FIGHTER_OUTLINE_GAP,SELECTED_FIGHTER_OUTLINE_WIDTH,SELECTED_FIGHTER_OUTLINE_ALPHA: 팀 색상 실루엣 마커의 캐릭터 이격 거리, 두께, 투명도.TEAM_COLORS,getTeamColor(): 8팀 이하에서는 기본 팔레트를 쓰고, 9팀 이상에서는 팀 수에 맞춰 중복 없는 색상을 동적으로 생성합니다.CAMERA.SPECTATOR_LERP: 카메라 추적의 부드러움 정도.CAMERA.METEOR_FOCUS_ENABLED,CAMERA.METEOR_FOCUS_ZOOM,CAMERA.METEOR_FOCUS_HOLD_DURATION: 자동 관전 진입 전 화염/냉기 메테오 착탄 위치의 임시 포커싱 on/off, 확대 배율 및 착탄 후 유지 시간.CAMERA.SPECTATOR_LATE_FIGHTER_THRESHOLD: 생존 인원 임계값에 따른 후반 자동 관전 진입 조건. (2팀만 남았더라도 이 수치보다 인원이 많으면 자동 관전을 유예합니다.)CAMERA.SPECTATOR_FINAL_TEAM_TOTAL_THRESHOLD,CAMERA.SPECTATOR_RANDOM_FOCUS_INTERVAL,COMBAT.FINAL_SLOW_MOTION_*: 최종교전 관전 조건, 랜덤 포커싱 간격, 슬로우모션 on/off, 배율과 속도 램프 시간.MINIMAP_VIEWPORT_SIZE: 미니맵의 고정 픽셀 크기.ARENA_SIZE: 경기장 전체 크기 (GRID * TILE).
2. 개발 및 유지보수 규칙
- 신규 캐릭터 추가:
public/assets/characters/에 에셋 배치 후fighterManifest.js에 정의를 추가하면 즉시 게임에 반영됩니다. - 종족값 유지: 신규 스킨을 추가할 때는 사망 통계가 누락되지 않도록
species를human,orc,skeleton,slime,wolf,bear중 하나로 지정해야 합니다. - 물리 수치 조정: 역할별 기본 체력/속도/사거리/공격 수치는
src/constants.js의FIGHTER_TYPE_STATS에서 변경하고, 특정 스킨만 다르게 할 때는fighterManifest.js의stats또는combat설정을 사용하십시오. - 처치 보너스 정책: elite 압축 전투에서는
src/constants.js의COMBAT.KILL_REWARD_ENABLED를false로 유지합니다. 별도 모드에서 재활성화할 때만KILL_GROWTH_MAX_MULTIPLIER등 보너스 수치를 조정합니다. - 공격력 조정: 역할별 기본 피해량은
src/constants.js의FIGHTER_TYPE_STATS.<type>.damageMin/damageMax를 수정합니다. 캐릭터별 특수 공격 방식은fighterManifest.js의combat설정을 우선 확인합니다. - 월드 이펙트 조정:
src/constants.js의WORLD_EFFECT.INTERVAL,WORLD_EFFECT.REPEAT_INTERVAL,WORLD_EFFECT.AREA_TILES,WORLD_EFFECT.WARNING_DURATION_MS,WORLD_EFFECT.IMPACT_AREA_TILES,WORLD_EFFECT.IMPACT_COUNT_MIN,WORLD_EFFECT.IMPACT_COUNT_MAX,WORLD_EFFECT.IMPACT_STAGGER_MS,WORLD_EFFECT.IMPACT_VISUAL_SCALE,WORLD_EFFECT.SIZE_SCALE_VARIANCE,WORLD_EFFECT.FALL_TRAVEL_TILES,WORLD_EFFECT.METEOR_SHAKE_DURATION_MS,WORLD_EFFECT.METEOR_SHAKE_INTENSITY,WORLD_EFFECT.METEOR_DAMAGE,WORLD_EFFECT.FROST_DAMAGE,WORLD_EFFECT.METEOR_DAMAGE_PERCENT,WORLD_EFFECT.FROST_DAMAGE_PERCENT,WORLD_EFFECT.FROST_STUN_DURATION,WORLD_EFFECT.FROST_STUN_TINT,WORLD_EFFECT.FROST_DURATION,WORLD_EFFECT.FROST_SPEED_MULTIPLIER를 수정합니다.INTERVAL은 첫 포격까지의 대기 시간,REPEAT_INTERVAL은 이후 일반 포격 주기,AREA_TILES와WARNING_DURATION_MS는 밀집 경고 구역과 표시 시간이며,IMPACT_*값은 그 내부 실제 포격을 제어합니다. 임시 메테오 카메라는CAMERA.METEOR_FOCUS_ENABLED로 끌 수 있습니다. - DOM 접근: 성능을 위해
ArenaScene은 좌측 HUD badge 등 필요한 시점에만 최소한으로 DOM에 접근합니다. - 패키지 락 파일: 이 프로젝트는
package-lock.json을 저장소에서 제외합니다. 의존성 변경 시package.json을 기준으로 관리합니다.