Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow provided rules for maps #56

Closed
RushFTK opened this issue Nov 20, 2019 · 2 comments
Closed

Allow provided rules for maps #56

RushFTK opened this issue Nov 20, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@RushFTK
Copy link
Contributor

RushFTK commented Nov 20, 2019

This is a important function for some special rules map like 1vs2 maps, High Funds maps, FoW maps etc.


实现方式

所有地图的地图属性,增加如下参数:

bool    isCustomRule = false              // 是否需要加载自定义规则
bool    isFool = false                    // 地图是否拥有战争迷雾
int     income = 1000                     // 设定每个建筑的收入,默认1000
int     weather = avaliableWeather.clear  // 设定地图天气
int     playerATeam = avaliableTeam.TeamA // 设定玩家A的默认队伍,下面类似
int     playerBTeam = avaliableTeam.TeamB
int     playerCTeam = avaliableTeam.TeamC
int     playerDTeam = avaliableTeam.TeamD

isCustomRule被设定为true时,创建新房间的默认值将读取地图属性中的对应项目进行。如果在地图属性中并未赋值该值,将采用上述记载的默认值。
其中,income可以改为incomemutiplier,因为你在tw里是如此实现的

下面的属性是DoR和(或)AWBW所特有的,可以考虑增加。部分需要实现对应功能,此种情况新开issue去完成,不在本issue的讨论范围内。

int   days = 0               // 存储天数(完整回合数)的上限,0为无上限
int   levelupMax = 3         // 设定晋升等级上限,0为关闭晋升系统
int   globalStartFunds = 0   // 全部玩家的起始资金
int[] bannedUnitList = null  // 存储在本局对战中不可用的所有单位对应的单位id
int[] bannedCOList = null    // 存储在本局对战中不可用的所有CO对应的COid
int[] labUnitList = null     // 通过占领特殊建筑`研究所`后可以建造的单位

days的胜负评判标准:在超过上限后的红方玩家起始回合,通过依次比较城数/单位价值总和判断胜负。亦可直接比较城数,相同视为平局。
当地图中没有研究所建筑时,labUnitList的效果等同于bannedUnitList

下面的属性是tw所特有的,可以考虑增加。

int  moveBouns = 0        // 等价于游戏设定界面的`Movement Bouns`
int  attackBouns = 0      // 等价于游戏设定界面的`Offense Bouns`
int  visionBouns = 0      // 等价于游戏设定界面的`Vision Bouns`
int  startPower = 0       // 等价于游戏设定界面的`inital Energy`
int  powerChargeSpeed = 1 // 等价于游戏设定界面的`Energy Growth Multipiler`

下面的属性方便于我对于未来的开发,可以考虑增加,如果难以实现亦可不用增加。

int  playerAStartFunds = 0       // 玩家A的起始资金,
int  playerBStartFunds = 0       // 与`globalStartFunds`叠加,
int  playerCStartFunds = 0       // 下面类似。
int  playerDStartFunds = 0
int playerAstartPowercharge = 0  // 玩家A的起始能量,
int playerBstartPowercharge = 0  // 与`startPower`叠加,但不超过上限,
int playerCstartPowercharge = 0  // 下面类似。
int playerDstartPowercharge = 0

设定每个玩家特别的起始资金能够开发出更有效的平衡手段。
而设定每个玩家的起始能量则是为方便RPG与教程进行的设定。
此外,为了便于简化参数数量,可以将对于玩家的针对设定整合在一个数组中,s.t.:int[] playerStartFunds

@RushFTK RushFTK added the enhancement New feature or request label Nov 20, 2019
@RushFTK RushFTK added this to To do in Maps Lifecycle Nov 20, 2019
@a9977321
Copy link
Contributor

#97

@Babygogogo
Copy link
Owner

Added in the test version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Maps Lifecycle
  
To do
Development

No branches or pull requests

3 participants