mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
chore: 地块类型标注 TileType (#15373)
* chore: 地块类型标注 TileType * chore: tile * style: format
This commit is contained in:
@@ -54,14 +54,25 @@ bool proc_data(
|
||||
using TileInfo = asst::TilePack::TileInfo;
|
||||
|
||||
static const std::unordered_map<std::string, TileKey> TileKeyMapping = {
|
||||
{ "tile_forbidden", TileKey::Forbidden }, { "tile_wall", TileKey::Wall },
|
||||
{ "tile_road", TileKey::Road }, { "tile_end", TileKey::Home },
|
||||
{ "tile_start", TileKey::EnemyHome }, { "tile_flystart", TileKey::Airport },
|
||||
{ "tile_floor", TileKey::Floor }, { "tile_hole", TileKey::Hole },
|
||||
{ "tile_telin", TileKey::Telin }, { "tile_telout", TileKey::Telout },
|
||||
{ "tile_grass", TileKey::Grass }, { "tile_deepsea", TileKey::DeepSea },
|
||||
{ "tile_deepwater", TileKey::DeepSea }, { "tile_volcano", TileKey::Volcano },
|
||||
{ "tile_healing", TileKey::Healing }, { "tile_fence", TileKey::Fence },
|
||||
{ "tile_forbidden", TileKey::Forbidden },
|
||||
{ "tile_wall", TileKey::Wall },
|
||||
{ "tile_road", TileKey::Road },
|
||||
{ "tile_end", TileKey::Home },
|
||||
{ "tile_start", TileKey::EnemyHome },
|
||||
{ "tile_green", TileKey::Green },
|
||||
{ "tile_flystart", TileKey::Airport },
|
||||
{ "tile_floor", TileKey::Floor },
|
||||
{ "tile_hole", TileKey::Hole },
|
||||
{ "tile_telin", TileKey::Telin },
|
||||
{ "tile_telout", TileKey::Telout },
|
||||
{ "tile_grass", TileKey::Grass },
|
||||
{ "tile_deepsea", TileKey::DeepSea },
|
||||
{ "tile_deepwater", TileKey::DeepSea },
|
||||
{ "tile_volcano", TileKey::Volcano },
|
||||
{ "tile_healing", TileKey::Healing },
|
||||
{ "tile_fence", TileKey::Fence /* 疑似弃用, 改为 tile_fence_bound */ },
|
||||
{ "tile_fence_bound", TileKey::Fence },
|
||||
{ "tile_infection", TileKey::Infection },
|
||||
};
|
||||
|
||||
auto key = TileKey::Invalid;
|
||||
@@ -70,7 +81,7 @@ bool proc_data(
|
||||
}
|
||||
else {
|
||||
key = TileKey::Invalid;
|
||||
Log.warn("Unknown tile type:", tile.tileKey);
|
||||
LogWarn << "Unknown tile type" << loc << ":" << tile.tileKey;
|
||||
}
|
||||
|
||||
dst.emplace(
|
||||
|
||||
@@ -24,26 +24,27 @@ public:
|
||||
Highland = 0,
|
||||
Floor = 1
|
||||
};
|
||||
// clang-format off
|
||||
enum class TileKey
|
||||
{
|
||||
Invalid = -1,
|
||||
Forbidden, // 不能放干员,敌人也不能走
|
||||
Wall, // 可以放高台干员的位置
|
||||
Road, // 可以放地面干员,敌人也可以走
|
||||
Home, // 蓝门(可能还有其他的情况)
|
||||
EnemyHome, // 红门(可能还有其他的情况)
|
||||
Airport, // 无人机始发站
|
||||
Floor, // 不能放干员,但敌人可以走
|
||||
Hole, // 空降兵掉下去的地方(
|
||||
Telin, // 传送门入口
|
||||
Telout, // 传送门出口
|
||||
Grass, // 草地,带有隐匿,可以放干员,部分地块敌人可以走
|
||||
DeepSea, // 水,不能直接放干员(要借助泳圈道具),敌人可以走,但敌人会持续掉血
|
||||
Volcano, // 岩浆地块,可以放干员,敌人也可以走,但是会持续掉血
|
||||
Healing, // 治疗地块,可以放干员,敌人也可以走,会给干员回血
|
||||
Fence, // 敌人不会走,但可以放干员的地面位置
|
||||
}; // clang-format on
|
||||
enum class TileKey
|
||||
{
|
||||
Invalid = -1,
|
||||
Forbidden, // 不能放干员,敌人也不能走
|
||||
Wall, // 可以放高台干员的位置
|
||||
Road, // 可以放地面干员,敌人也可以走
|
||||
Home, // 蓝门(可能还有其他的情况)
|
||||
EnemyHome, // 红门(可能还有其他的情况)
|
||||
Green, // 绿门, 怪从绿门进入之后, 在后续阶段出现, 常见于引航者试炼
|
||||
Airport, // 无人机始发站
|
||||
Floor, // 不能放干员,但敌人可以走
|
||||
Hole, // 空降兵掉下去的地方(
|
||||
Telin, // 传送门入口
|
||||
Telout, // 传送门出口
|
||||
Grass, // 草地,带有隐匿,可以放干员,部分地块敌人可以走
|
||||
DeepSea, // 水,不能直接放干员(要借助泳圈道具),敌人可以走,但敌人会持续掉血
|
||||
Volcano, // 岩浆地块,可以放干员,敌人也可以走,但是会持续掉血
|
||||
Healing, // 治疗地块,可以放干员,敌人也可以走,会给干员回血
|
||||
Fence, // 敌人不会走,但可以放干员的地面位置
|
||||
Infection, // 源石地板, 可以放干员,敌人也可以走,但是会持续掉血, 且攻击力增加
|
||||
};
|
||||
|
||||
struct TileInfo
|
||||
{
|
||||
|
||||
@@ -1087,6 +1087,7 @@ asst::RoguelikeBattleTaskPlugin::DirectionAndScore asst::RoguelikeBattleTaskPlug
|
||||
{ TileKey::Telin, 700 }, { TileKey::Telout, 800 }, { TileKey::Grass, 500 },
|
||||
{ TileKey::DeepSea, 1000 }, { TileKey::Volcano, 1000 }, { TileKey::Healing, 1000 },
|
||||
{ TileKey::Fence, 800 },
|
||||
// Todo: TileKey::Green, TileKey::Infection
|
||||
};
|
||||
// 治疗干员朝向的权重
|
||||
static const std::unordered_map<TileKey, int> TileKeyMedicWeights = {
|
||||
|
||||
Reference in New Issue
Block a user