Commit 71d322a4 authored by VanillaSalt's avatar VanillaSalt

update

parent 3ad6304e
......@@ -45,8 +45,8 @@ field::field(duel* pduel) {
infos.phase = 0;
infos.turn_player = 0;
for (int32 i = 0; i < 2; ++i) {
cost[i].count = 0;
cost[i].amount = 0;
//cost[i].count = 0;
//cost[i].amount = 0;
core.hint_timing[i] = 0;
player[i].lp = 8000;
player[i].start_count = 5;
......@@ -2024,11 +2024,12 @@ int32 field::check_lp_cost(uint8 playerid, uint32 lp) {
e.reason_player = playerid;
if(effect_replace_check(EFFECT_LPCOST_REPLACE, e))
return TRUE;
cost[playerid].amount += val;
if(cost[playerid].amount <= player[playerid].lp)
//cost[playerid].amount += val;
if(val <= player[playerid].lp)
return TRUE;
return FALSE;
}
/*
void field::save_lp_cost() {
for(uint8 playerid = 0; playerid < 2; ++playerid) {
if(cost[playerid].count < 8)
......@@ -2043,6 +2044,7 @@ void field::restore_lp_cost() {
cost[playerid].amount = cost[playerid].lpstack[cost[playerid].count];
}
}
*/
uint32 field::get_field_counter(uint8 self, uint8 s, uint8 o, uint16 countertype) {
uint8 c = s;
uint32 count = 0;
......
......@@ -325,7 +325,7 @@ public:
player_info player[2];
card* temp_card;
field_info infos;
lpcost cost[2];
//lpcost cost[2];
field_effect effects;
processor core;
return_value returns;
......@@ -401,8 +401,8 @@ public:
int32 check_spsummon_counter(uint8 playerid, uint8 ct = 1);
int32 check_lp_cost(uint8 playerid, uint32 cost);
void save_lp_cost();
void restore_lp_cost();
void save_lp_cost() {}
void restore_lp_cost() {}
int32 pay_lp_cost(uint32 step, uint8 playerid, uint32 cost);
uint32 get_field_counter(uint8 self, uint8 s, uint8 o, uint16 countertype);
......
......@@ -625,7 +625,6 @@ int32 field::pay_lp_cost(uint32 step, uint8 playerid, uint32 cost) {
effect* peffect = core.select_effects[returns.ivalue[0]];
if(!peffect) {
player[playerid].lp -= cost;
this->cost[playerid].amount -= cost;
pduel->write_buffer8(MSG_PAY_LPCOST);
pduel->write_buffer8(playerid);
pduel->write_buffer32(cost);
......
......@@ -1165,10 +1165,10 @@ int32 field::execute_operation(uint16 step, effect * triggering_effect, uint8 tr
shuffle(0, LOCATION_DECK);
if(core.shuffle_deck_check[1])
shuffle(1, LOCATION_DECK);
cost[0].count = 0;
cost[1].count = 0;
cost[0].amount = 0;
cost[1].amount = 0;
//cost[0].count = 0;
//cost[1].count = 0;
//cost[0].amount = 0;
//cost[1].amount = 0;
}
core.shuffle_check_disabled = FALSE;
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment