S7-01 + S7-02

This commit is contained in:
2026-03-12 10:46:11 +08:00
parent d34af661b9
commit 185ea43323
20 changed files with 468 additions and 112 deletions
@@ -12,7 +12,7 @@ namespace GeometryTD.CustomUtility
private static readonly TagType[] IceAbsoluteZeroPool = { TagType.Ice, TagType.AbsoluteZero };
private static readonly TagType[] PierceExecutionPool = { TagType.Pierce, TagType.Execution };
public static BackpackInventoryData CreateSampleInventory()
public static BackpackInventoryData CreateSampleInventory(int runSeed = 0)
{
BackpackInventoryData inventory = new BackpackInventoryData
{
@@ -31,7 +31,7 @@ namespace GeometryTD.CustomUtility
DamageRandomRate = 0.05f,
AttackMethodType = AttackMethodType.NormalBullet,
Constraint = string.Empty,
Tags = ResolveSeedTags(FirePool, RarityType.Blue, 10001, 1)
Tags = ResolveSeedTags(FirePool, RarityType.Blue, runSeed, 10001, 1)
};
BearingCompItemData bearing = new BearingCompItemData
@@ -45,7 +45,7 @@ namespace GeometryTD.CustomUtility
RotateSpeed = new[] { 100f, 120f, 130f, 140f, 150f },
AttackRange = new[] { 3f, 4f, 5f, 6f, 8f },
Constraint = string.Empty,
Tags = ResolveSeedTags(FirePool, RarityType.Blue, 20001, 1)
Tags = ResolveSeedTags(FirePool, RarityType.Blue, runSeed, 20001, 1)
};
BaseCompItemData baseComp = new BaseCompItemData
@@ -59,7 +59,7 @@ namespace GeometryTD.CustomUtility
AttackSpeed = new[] { 1f, 2f, 3f, 3.5f, 0.7f },
AttackPropertyType = AttackPropertyType.Fire,
Constraint = string.Empty,
Tags = ResolveSeedTags(FirePool, RarityType.Blue, 30001, 1)
Tags = ResolveSeedTags(FirePool, RarityType.Blue, runSeed, 30001, 1)
};
TowerItemData tower = new TowerItemData
@@ -108,7 +108,7 @@ namespace GeometryTD.CustomUtility
DamageRandomRate = 0.01f,
AttackMethodType = AttackMethodType.NormalBullet,
Constraint = string.Empty,
Tags = ResolveSeedTags(IceFreezePool, RarityType.Blue, 10002, 2)
Tags = ResolveSeedTags(IceFreezePool, RarityType.Blue, runSeed, 10002, 2)
});
inventory.MuzzleComponents.Add(new MuzzleCompItemData
@@ -123,7 +123,7 @@ namespace GeometryTD.CustomUtility
DamageRandomRate = 0.02f,
AttackMethodType = AttackMethodType.NormalBullet,
Constraint = string.Empty,
Tags = ResolveSeedTags(CritPiercePool, RarityType.Purple, 10003, 3)
Tags = ResolveSeedTags(CritPiercePool, RarityType.Purple, runSeed, 10003, 3)
});
inventory.BearingComponents.Add(new BearingCompItemData
@@ -137,7 +137,7 @@ namespace GeometryTD.CustomUtility
RotateSpeed = new[] { 200f, 250f, 300f, 320f, 350f },
AttackRange = new[] { 6f, 6.5f, 7f, 8f, 8f },
Constraint = string.Empty,
Tags = ResolveSeedTags(IceShatterPool, RarityType.Blue, 20002, 2)
Tags = ResolveSeedTags(IceShatterPool, RarityType.Blue, runSeed, 20002, 2)
});
inventory.BearingComponents.Add(new BearingCompItemData
@@ -151,7 +151,7 @@ namespace GeometryTD.CustomUtility
RotateSpeed = new[] { 60f, 70f, 80f, 90f, 100f },
AttackRange = new[] { 4f, 4.5f, 5f, 5.5f, 6f },
Constraint = string.Empty,
Tags = ResolveSeedTags(PierceOverpenetratePool, RarityType.Purple, 20003, 3)
Tags = ResolveSeedTags(PierceOverpenetratePool, RarityType.Purple, runSeed, 20003, 3)
});
inventory.BaseComponents.Add(new BaseCompItemData
@@ -165,7 +165,7 @@ namespace GeometryTD.CustomUtility
AttackSpeed = new[] { 4f, 4.2f, 4.4f, 4.6f, 4.8f },
AttackPropertyType = AttackPropertyType.Ice,
Constraint = string.Empty,
Tags = ResolveSeedTags(IceAbsoluteZeroPool, RarityType.Blue, 30002, 2)
Tags = ResolveSeedTags(IceAbsoluteZeroPool, RarityType.Blue, runSeed, 30002, 2)
});
inventory.BaseComponents.Add(new BaseCompItemData
@@ -179,7 +179,7 @@ namespace GeometryTD.CustomUtility
AttackSpeed = new[] { 1f, 1f, 1f, 1f, 1f },
AttackPropertyType = AttackPropertyType.Physics,
Constraint = string.Empty,
Tags = ResolveSeedTags(PierceExecutionPool, RarityType.Purple, 30003, 3)
Tags = ResolveSeedTags(PierceExecutionPool, RarityType.Purple, runSeed, 30003, 3)
});
inventory.ParticipantTowerInstanceIds.Add(90001);
@@ -187,14 +187,12 @@ namespace GeometryTD.CustomUtility
return inventory;
}
private static TagType[] ResolveSeedTags(TagType[] possibleTags, RarityType rarity, long instanceId, int configId)
private static TagType[] ResolveSeedTags(TagType[] possibleTags, RarityType rarity, int runSeed, long instanceId, int configId)
{
return ComponentTagGenerationService.ResolveComponentTags(
possibleTags,
rarity,
InventoryTagSourceType.Seed,
instanceId,
configId);
InventoryTagRandomContext.CreateSeed(runSeed, instanceId, configId));
}
}
}