This commit is contained in:
yuexin 2021-03-17 15:08:02 +08:00
parent 4b669725e9
commit a7a4069e6b
3 changed files with 41 additions and 41 deletions

View File

@ -1 +1 @@
[{"id":99001,"type_id":1,"value":6},{"id":99002,"type_id":1,"value":2},{"id":99003,"type_id":2,"value":20},{"id":99004,"type_id":1,"value":2},{"id":99005,"type_id":1,"value":1},{"id":99006,"type_id":1,"value":20},{"id":99007,"type_id":1,"value":12},{"id":99008,"type_id":2,"value":12},{"id":99009,"type_id":2,"value":15},{"id":99010,"type_id":2,"value":15},{"id":99011,"type_id":2,"value":20},{"id":99012,"type_id":2,"value":8},{"id":99013,"type_id":1,"value":3},{"id":99014,"type_id":2,"value":5},{"id":99015,"type_id":1,"value":10},{"id":99016,"type_id":1,"value":10},{"id":99017,"type_id":2,"value":7},{"id":99018,"type_id":2,"value":7},{"id":99019,"type_id":2,"value":5},{"id":99020,"type_id":2,"value":30},{"id":99021,"type_id":3,"value":15},{"id":99022,"type_id":3,"value":35},{"id":99023,"type_id":1,"value":2},{"id":99024,"type_id":1,"value":3},{"id":99025,"type_id":1,"value":3},{"id":99026,"type_id":2,"value":1},{"id":99027,"type_id":1,"value":5},{"id":99028,"type_id":1,"value":5},{"id":99029,"type_id":1,"value":6},{"id":99030,"type_id":1,"value":6},{"id":99031,"type_id":4,"value":90001},{"id":99032,"type_id":4,"value":90002},{"id":99033,"type_id":2,"value":15},{"id":99034,"type_id":4,"value":80031},{"id":99035,"type_id":4,"value":80029},{"id":99036,"type_id":4,"value":80030},{"id":99037,"type_id":4,"value":80032},{"id":99038,"type_id":1,"value":20},{"id":99039,"type_id":5,"value":0},{"id":99040,"type_id":5,"value":0},{"id":99041,"type_id":3,"value":50},{"id":99042,"type_id":3,"value":0},{"id":99043,"type_id":3,"value":45},{"id":99044,"type_id":3,"value":68},{"id":99045,"type_id":3,"value":80},{"id":99046,"type_id":3,"value":0},{"id":99047,"type_id":3,"value":5},{"id":99048,"type_id":3,"value":15},{"id":99049,"type_id":3,"value":30}]
[{"id":99001,"type_id":1,"value":"6"},{"id":99002,"type_id":1,"value":"2"},{"id":99003,"type_id":2,"value":"20"},{"id":99004,"type_id":1,"value":"2"},{"id":99005,"type_id":1,"value":"1"},{"id":99006,"type_id":1,"value":"20"},{"id":99007,"type_id":1,"value":"12"},{"id":99008,"type_id":2,"value":"12"},{"id":99009,"type_id":2,"value":"15"},{"id":99010,"type_id":2,"value":"15"},{"id":99011,"type_id":2,"value":"20"},{"id":99012,"type_id":2,"value":"8"},{"id":99013,"type_id":1,"value":"3"},{"id":99014,"type_id":2,"value":"5"},{"id":99015,"type_id":1,"value":"10"},{"id":99016,"type_id":1,"value":"10"},{"id":99017,"type_id":2,"value":"7"},{"id":99018,"type_id":2,"value":"7"},{"id":99019,"type_id":2,"value":"5"},{"id":99020,"type_id":2,"value":"30"},{"id":99021,"type_id":3,"value":"15"},{"id":99022,"type_id":3,"value":"35"},{"id":99023,"type_id":1,"value":"2"},{"id":99024,"type_id":1,"value":"3"},{"id":99025,"type_id":1,"value":"3"},{"id":99026,"type_id":2,"value":"1"},{"id":99027,"type_id":1,"value":"5"},{"id":99028,"type_id":1,"value":"5"},{"id":99029,"type_id":1,"value":"6"},{"id":99030,"type_id":1,"value":"6"},{"id":99031,"type_id":4,"value":"90001"},{"id":99032,"type_id":4,"value":"90002"},{"id":99033,"type_id":2,"value":"15"},{"id":99034,"type_id":4,"value":"80031"},{"id":99035,"type_id":4,"value":"80029"},{"id":99036,"type_id":4,"value":"80030"},{"id":99037,"type_id":4,"value":"80032"},{"id":99038,"type_id":1,"value":"20"},{"id":99039,"type_id":5,"value":"0"},{"id":99040,"type_id":5,"value":"0"},{"id":99041,"type_id":3,"value":"50"},{"id":99042,"type_id":3,"value":"0"},{"id":99043,"type_id":3,"value":"45"},{"id":99044,"type_id":3,"value":"68"},{"id":99045,"type_id":3,"value":"80"},{"id":99046,"type_id":3,"value":"0"},{"id":99047,"type_id":3,"value":"5"},{"id":99048,"type_id":3,"value":"15"},{"id":99049,"type_id":3,"value":"30"},{"id":99050,"type_id":4,"value":"130001:130014"},{"id":99051,"type_id":4,"value":"130017:130041"},{"id":99052,"type_id":4,"value":"130044:130068"}]

View File

@ -82,49 +82,49 @@ export class GameEnv {
public maxWaitingTime: number
public init(data: Map<number, BaseCfg>) {
this.initCardNum = data.get(BaseConst.INIT_CARD_NUM).value
this.cardChangeNum = data.get(BaseConst.CARD_CHANGE_NUM).value
this.cardChangeTime = data.get(BaseConst.CARD_CHANGE_TIME).value
this.roundDrawNum = data.get(BaseConst.ROUND_DRAW_NUM).value
this.duelRoundNum = data.get(BaseConst.DUEL_ROUND_NUM).value
this.maxDuelNum = data.get(BaseConst.MAX_DUEL_NUM).value
this.maxCardNum = data.get(BaseConst.MAX_CARD_NUM).value
this.maxDiscardTime = data.get(BaseConst.MAX_DISCARD_TIME).value
this.maxEatTime = data.get(BaseConst.MAX_EAT_TIME).value
this.playerActTime = data.get(BaseConst.PLAYER_ACT_TIME).value
this.maxExtTime = data.get(BaseConst.MAX_EXT_TIME).value
this.roundExtTime = data.get(BaseConst.ROUND_EXT_TIME).value
this.maxPlayerPetCount = data.get(BaseConst.MAX_PLAYER_PET_COUNT).value
this.resultShowTime = data.get(BaseConst.ROUND_SHOW_TIME).value
this.baseAddScore = data.get(BaseConst.BASE_ADD_SCORE).value
this.extraAddScore = data.get(BaseConst.EXTRA_ADD_SCORE).value
this.gameResultTime = data.get(BaseConst.GAME_RESULT_TIME).value
this.waitingPlayerTime = data.get(BaseConst.WAITING_PLAYER_TIME).value
this.waitingPlayerOnePlus = data.get(BaseConst.WAITING_PLAYER_ONEPLUS).value
this.pickHeroTime = data.get(BaseConst.PICK_HERO_TIME).value
this.robotActTimeMin = data.get(BaseConst.ROBOT_ACTTIME_MIN).value
this.robotActTimeMax = data.get(BaseConst.ROBOT_ACTTIME_MAX).value
this.teamDeadAddNum = data.get(BaseConst.TEAM_DEAD_ADDNUM).value
this.selfEatCount = data.get(BaseConst.SELF_EAT_COUNT).value
this.otherEatCount = data.get(BaseConst.OTHER_EAT_COUNT).value
this.emptyRoundTime = data.get(BaseConst.EMPTY_ROUND_TIME).value
this.initCardNum = parseInt(data.get(BaseConst.INIT_CARD_NUM).value)
this.cardChangeNum = parseInt(data.get(BaseConst.CARD_CHANGE_NUM).value)
this.cardChangeTime = parseInt(data.get(BaseConst.CARD_CHANGE_TIME).value)
this.roundDrawNum = parseInt(data.get(BaseConst.ROUND_DRAW_NUM).value)
this.duelRoundNum = parseInt(data.get(BaseConst.DUEL_ROUND_NUM).value)
this.maxDuelNum = parseInt(data.get(BaseConst.MAX_DUEL_NUM).value)
this.maxCardNum = parseInt(data.get(BaseConst.MAX_CARD_NUM).value)
this.maxDiscardTime = parseInt(data.get(BaseConst.MAX_DISCARD_TIME).value)
this.maxEatTime = parseInt(data.get(BaseConst.MAX_EAT_TIME).value)
this.playerActTime = parseInt(data.get(BaseConst.PLAYER_ACT_TIME).value)
this.maxExtTime = parseInt(data.get(BaseConst.MAX_EXT_TIME).value)
this.roundExtTime = parseInt(data.get(BaseConst.ROUND_EXT_TIME).value)
this.maxPlayerPetCount = parseInt(data.get(BaseConst.MAX_PLAYER_PET_COUNT).value)
this.resultShowTime = parseInt(data.get(BaseConst.ROUND_SHOW_TIME).value)
this.baseAddScore = parseInt(data.get(BaseConst.BASE_ADD_SCORE).value)
this.extraAddScore = parseInt(data.get(BaseConst.EXTRA_ADD_SCORE).value)
this.gameResultTime = parseInt(data.get(BaseConst.GAME_RESULT_TIME).value)
this.waitingPlayerTime = parseInt(data.get(BaseConst.WAITING_PLAYER_TIME).value)
this.waitingPlayerOnePlus = parseInt(data.get(BaseConst.WAITING_PLAYER_ONEPLUS).value)
this.pickHeroTime = parseInt(data.get(BaseConst.PICK_HERO_TIME).value)
this.robotActTimeMin = parseInt(data.get(BaseConst.ROBOT_ACTTIME_MIN).value)
this.robotActTimeMax = parseInt(data.get(BaseConst.ROBOT_ACTTIME_MAX).value)
this.teamDeadAddNum = parseInt(data.get(BaseConst.TEAM_DEAD_ADDNUM).value)
this.selfEatCount = parseInt(data.get(BaseConst.SELF_EAT_COUNT).value)
this.otherEatCount = parseInt(data.get(BaseConst.OTHER_EAT_COUNT).value)
this.emptyRoundTime = parseInt(data.get(BaseConst.EMPTY_ROUND_TIME).value)
this.playerInitNums = [
data.get(BaseConst.PLAYER1_INIT_NUM).value,
data.get(BaseConst.PLAYER2_INIT_NUM).value,
data.get(BaseConst.PLAYER3_INIT_NUM).value,
data.get(BaseConst.PLAYER4_INIT_NUM).value
parseInt(data.get(BaseConst.PLAYER1_INIT_NUM).value),
parseInt(data.get(BaseConst.PLAYER2_INIT_NUM).value),
parseInt(data.get(BaseConst.PLAYER3_INIT_NUM).value),
parseInt(data.get(BaseConst.PLAYER4_INIT_NUM).value)
]
this.canEatBase = !!data.get(BaseConst.CAN_EAT_BASE).value
this.canEatAdv = !!data.get(BaseConst.CAN_EAT_ADV).value
this.petInheritRate = data.get(BaseConst.PET_INHERIT_RATE).value / 100
this.robotLvlLow = data.get(BaseConst.ROBOT_LVL_LOW).value
this.robotLvlMid = data.get(BaseConst.ROBOT_LVL_MID).value
this.robotLvlHigh = data.get(BaseConst.ROBOT_LVL_HIGHT).value
this.robotLvlExtra = data.get(BaseConst.ROBOT_LVL_EXTRA).value
this.robotRateLow = data.get(BaseConst.ROBOT_RATE_LOW).value
this.robotRateMid = data.get(BaseConst.ROBOT_RATE_MID).value
this.robotRateHigh = data.get(BaseConst.ROBOT_RATE_HIGHT).value
this.robotRateExtra = data.get(BaseConst.ROBOT_RATE_EXTRA).value
this.petInheritRate = parseInt(data.get(BaseConst.PET_INHERIT_RATE).value) / 100
this.robotLvlLow = parseInt(data.get(BaseConst.ROBOT_LVL_LOW).value)
this.robotLvlMid = parseInt(data.get(BaseConst.ROBOT_LVL_MID).value)
this.robotLvlHigh = parseInt(data.get(BaseConst.ROBOT_LVL_HIGHT).value)
this.robotLvlExtra = parseInt(data.get(BaseConst.ROBOT_LVL_EXTRA).value)
this.robotRateLow = parseInt(data.get(BaseConst.ROBOT_RATE_LOW).value)
this.robotRateMid = parseInt(data.get(BaseConst.ROBOT_RATE_MID).value)
this.robotRateHigh = parseInt(data.get(BaseConst.ROBOT_RATE_HIGHT).value)
this.robotRateExtra = parseInt(data.get(BaseConst.ROBOT_RATE_EXTRA).value)
this.maxWaitingTime = 60
}
public getCheatRate(val: number) {

View File

@ -5,7 +5,7 @@ export class BaseCfg implements Cfg{
public id: number;
public type_id: number;
public value: number;
public value: string;
public decode(data: any) {
this.id = data.id;