Scale difficulty by run position; wipe towers at phase end

Follow-up pass on the 2.0 refactor, closing the gap between "waves are drawn
at random" and "difficulty still lives in the enemy assets".

- Enemy health is no longer authored per enemy type. New EnemyScalingConfig
  scales a per-zone HP *budget* by encounter number; per-enemy health is that
  budget divided by the wave's enemy count. Scaling the total rather than the
  per-enemy value keeps enemy count a texture knob (few tanks vs many swarmers)
  instead of a second, uncontrolled difficulty axis. EnemyDefinition.MaxHp
  becomes HpMultiplier, a deviation around 1.0. Speed stays archetype-only and
  unscaled -- escalating it compounds with health and invalidates tower balance
  mid-run.
- GoldConfig entries no longer reference a WaveDefinition. Payout is a property
  of run position, not of which wave got drawn: WaveGoldEntry ->
  EncounterGoldEntry, Waves -> Encounters, keyed by global encounter number.
  Its inspector labels elements "Encounter N" and projects cumulative earnings.
- The wave's voted buffs now show as icon badges in the top bar, read from the
  same RunState slot the spawn path uses so the display can't drift from what
  the enemies actually carry. Hover names the buff; unillustrated cards fall
  back to a lettered badge rather than vanishing.
- Clearing a phase's boss destroys every built tower, unrefunded. Queued build
  jobs still refund -- those towers were never delivered. Runs with the field
  empty, so the walkability churn doesn't hit the re-path scheduler.
- Fixed an RPC codegen break: [ClientRpc] requires a ClientRpc suffix, unlike
  the newer [Rpc(SendTo...)] style this file doesn't use.
- Setup checklist reordered into dependency order; it previously asked for a
  RunDefinition two sections before creating one.

Also carries the editor-side asset reorganisation into Definitions/RunDefinitions
and the sprite move into Enemy/Player draft icon folders.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Matt F 2026-07-31 00:32:33 -07:00
parent 4892d7253d
commit 16706a1ecf
154 changed files with 2608 additions and 287 deletions

View file

@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4eaef3264612070c48fbc6a987c89858, type: 3}
m_Name: Draft_BuilderEffect_GoldPerKill
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.BuilderEffectDraftOption
DisplayName: Gold Per Kill
Description: Get more gold per kill
Icon: {fileID: 0}
Weight: 1
Kind: 0

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 65ff25c1c8a89f7df8e88f71968c1c98
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a574e8aa74d8787f2b949300932af485, type: 3}
m_Name: Draft_BuilderSpellOption_Fireball
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.BuilderSpellDraftOption
DisplayName: Fireball
Description: Shoot a FIREBALL out of your COCK
Icon: {fileID: 0}
Weight: 1
Kind: 0

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5f390de69ba43b2a6a0d89cf09580320
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a574e8aa74d8787f2b949300932af485, type: 3}
m_Name: Draft_BuilderSpellOption_SlowArea
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.BuilderSpellDraftOption
DisplayName: Slow Area
Description: Slows enemies in the target area
Icon: {fileID: 0}
Weight: 1
Kind: 1

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 29b35841f7e5db454903798cb5d83434
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7b1c5b562f39c72eea3bafd0165af078, type: 3}
m_Name: Draft_BuilderSpellOption_SlowAreaUpgrade
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.BuilderSpellUpgradeDraftOption
DisplayName: Slow Area II
Description: Slows enemies in the area for 50% longer than the default slow area.
Icon: {fileID: 0}
Weight: 1
BaseKind: 1
UpgradedKind: 2

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d180030b68a9a5e1da497bf6f83451d4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c2d6e4f1a9b4c73d05e8f1a2b6c9d40, type: 3}
m_Name: Draft_NewTower_SiegeCannon
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.NewTowerDraftOption
DisplayName: Siege Cannon
Description: Add the Siege Cannon to your arsenal. Ground-only; lobs a shell that
deals splash damage on impact.
Icon: {fileID: 21300000, guid: 1423e4bda9704c3b826b0eb847c29c1c, type: 3}
Weight: 1
Tower: {fileID: 11400000, guid: 04219895bbea4fb9a94fd62fef35bf2a, type: 2}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6b1d3f8a2c5e4097b8a1d0c3e6f9b240
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c2d6e4f1a9b4c73d05e8f1a2b6c9d40, type: 3}
m_Name: Draft_NewTower_TeslaCoil
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.NewTowerDraftOption
DisplayName: Tesla Coil
Description: Add the Tesla Coil to your arsenal. Zaps all enemies in a short range
at once.
Icon: {fileID: 0}
Weight: 1
Tower: {fileID: 11400000, guid: e3f1a9c2b5d84e76a0c3f1e8d27b4905, type: 2}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f4a2b8d1c6e93f05a7b2d4c8e1f6a930
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c2d6e4f1a9b4c73d05e8f1a2b6c9d40, type: 3}
m_Name: Draft_NewTower_Wall
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.NewTowerDraftOption
DisplayName: Wall
Description: Add the Wall to your arsenal. No attack, near-free; shapes your maze.
Icon: {fileID: 0}
Weight: 1
Tower: {fileID: 11400000, guid: d5b2e8fa3c7e9b5f4a1d0c2e7f6b3a91, type: 2}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7c2e4a9b3d6f51a80c9b2e1d4f7a3b51
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,21 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: aeec22f152a57ef5798eae035c091543, type: 3}
m_Name: Draft_TowerUpgrade_Arrow_1
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.Draft.TowerUpgradeDraftOption
DisplayName: Arrow Tower Upgrade 1
Description: Unlock the ability to upgrade Arrow Towers with more damage and a
faster attack speed
Icon: {fileID: 21300000, guid: a140f62a10b8dc04e84625f8008e0c24, type: 3}
Weight: 1
BaseTower: {fileID: 11400000, guid: 0f693e29ca953e1439e10cb8f12e4b30, type: 2}
UpgradedTower: {fileID: 11400000, guid: 86d4c3ab00d4c654eb4c255280ee5701, type: 2}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0b9f4905752751f44b9959b84b620266
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant: