You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
580 B
22 lines
580 B
|
3 weeks ago
|
/**
|
||
|
|
* AI 侧地图阵营约定(与 `MapPlaceValidator` 一致:playerId+1)。
|
||
|
|
* 己方放置区=1,敌方/AI 放置区=2。
|
||
|
|
*/
|
||
|
|
|
||
|
|
/** 己方(下方玩家)CampAreaID */
|
||
|
|
export const AI_VIEW_LOCAL_CAMP = 1;
|
||
|
|
|
||
|
|
/** 敌方(上方 AI)CampAreaID */
|
||
|
|
export const AI_PLACE_CAMP = 2;
|
||
|
|
|
||
|
|
/** 对手 playerId(本机为 0) */
|
||
|
|
export const AI_PLAYER_ID = 1;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* AI playerId 对应可放置 CampAreaID。
|
||
|
|
* @param playerId 0=本机,1=AI
|
||
|
|
*/
|
||
|
|
export function aiPlaceCampForPlayer(playerId: number): number {
|
||
|
|
return playerId === 0 ? AI_VIEW_LOCAL_CAMP : AI_PLACE_CAMP;
|
||
|
|
}
|