Change multiplayer payout to 2x, if amulet then 10x
This commit is contained in:
@@ -25,7 +25,7 @@ struct rogue_packitem
|
||||
};
|
||||
struct rogue_player
|
||||
{
|
||||
int32_t gold,hitpoints,strength,level,experience,packsize,dungeonlevel,pad;
|
||||
int32_t gold,hitpoints,strength,level,experience,packsize,dungeonlevel,amulet;
|
||||
struct rogue_packitem roguepack[MAXPACK];
|
||||
};
|
||||
int32_t rogue_replay2(uint8_t *newdata,uint64_t seed,char *keystrokes,int32_t num,struct rogue_player *player,int32_t sleepmillis);
|
||||
|
||||
@@ -1452,6 +1452,7 @@ rs_write_object(struct rogue_state *rs,FILE *savef, THING *o)
|
||||
rs->P.level = pstats.s_lvl;
|
||||
rs->P.experience = pstats.s_exp;
|
||||
rs->P.dungeonlevel = level;
|
||||
rs->P.amulet = amulet;
|
||||
//fprintf(stderr,"%ld gold.%d hp.%d strength.%d/%d level.%d exp.%d %d\n",ftell(savef),purse,max_hp,pstats.s_str,max_stats.s_str,pstats.s_lvl,pstats.s_exp,level);
|
||||
}
|
||||
//fprintf(stderr,"object (%s) x.%d y.%d type.%d pack.(%c:%d)\n",inv_name(o,FALSE),o->_o._o_pos.x,o->_o._o_pos.y,o->_o._o_type,o->_o._o_packch,o->_o._o_packch);
|
||||
|
||||
@@ -957,7 +957,7 @@ UniValue rogue_finishgame(uint64_t txfee,struct CCcontract_info *cp,cJSON *param
|
||||
else
|
||||
{
|
||||
funcid = 'H';
|
||||
mult = 1000000;
|
||||
mult = 200000;
|
||||
}
|
||||
if ( (params= cclib_reparse(&n,params)) != 0 )
|
||||
{
|
||||
@@ -1008,11 +1008,13 @@ UniValue rogue_finishgame(uint64_t txfee,struct CCcontract_info *cp,cJSON *param
|
||||
cpTokens = CCinit(&tokensC, EVAL_TOKENS);
|
||||
mtx.vout.push_back(MakeCC1vout(EVAL_TOKENS, txfee, GetUnspendable(cpTokens,NULL))); // marker to token cc addr, burnable and validated
|
||||
mtx.vout.push_back(MakeTokensCC1vout(cp->evalcode,1,mypk));
|
||||
fprintf(stderr,"\nextracted $$$gold.%d hp.%d strength.%d/%d level.%d exp.%d dl.%d n.%d size.%d\n",P.gold,P.hitpoints,P.strength&0xffff,P.strength>>16,P.level,P.experience,P.dungeonlevel,n,(int32_t)sizeof(P));
|
||||
fprintf(stderr,"\nextracted $$$gold.%d hp.%d strength.%d/%d level.%d exp.%d dl.%d n.%d amulet.%d\n",P.gold,P.hitpoints,P.strength&0xffff,P.strength>>16,P.level,P.experience,P.dungeonlevel,n,P.amulet);
|
||||
if ( P.amulet != 0 )
|
||||
mult *= 5;
|
||||
cashout = (uint64_t)P.gold * mult;
|
||||
if ( funcid == 'H' && maxplayers > 1 )
|
||||
{
|
||||
if ( numplayers != maxplayers || (numplayers - rogue_playersalive(tmp,gametxid,maxplayers)) > 1 && (P.dungeonlevel > 1 || P.gold < 10000 || P.level < 20) )
|
||||
if ( (numplayers != maxplayers || (numplayers - rogue_playersalive(tmp,gametxid,maxplayers)) > 1) && P.amulet == 0 )
|
||||
return(cclib_error(result,"highlander must be a winner or last one standing"));
|
||||
cashout += numplayers * buyin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user