Commit 01ad314e authored by DailyShana's avatar DailyShana

fix base atk/def calculation

parent 1765590f
...@@ -509,7 +509,7 @@ int32 card::get_base_attack() { ...@@ -509,7 +509,7 @@ int32 card::get_base_attack() {
eset.sort(); eset.sort();
// calculate continuous effects of this first // calculate continuous effects of this first
for(int32 i = 0; i < eset.size();) { for(int32 i = 0; i < eset.size();) {
if((eset[i]->type & EFFECT_TYPE_SINGLE) && eset[i]->is_flag(EFFECT_FLAG_SINGLE_RANGE)) { if(!(eset[i]->type & EFFECT_TYPE_SINGLE) || eset[i]->is_flag(EFFECT_FLAG_SINGLE_RANGE)) {
switch(eset[i]->code) { switch(eset[i]->code) {
case EFFECT_SET_BASE_ATTACK: case EFFECT_SET_BASE_ATTACK:
batk = eset[i]->get_value(this); batk = eset[i]->get_value(this);
...@@ -585,7 +585,7 @@ int32 card::get_attack() { ...@@ -585,7 +585,7 @@ int32 card::get_attack() {
rev = TRUE; rev = TRUE;
effect_set effects_atk, effects_atk_r; effect_set effects_atk, effects_atk_r;
for(int32 i = 0; i < eset.size();) { for(int32 i = 0; i < eset.size();) {
if((eset[i]->type & EFFECT_TYPE_SINGLE) && eset[i]->is_flag(EFFECT_FLAG_SINGLE_RANGE)) { if(!(eset[i]->type & EFFECT_TYPE_SINGLE) || eset[i]->is_flag(EFFECT_FLAG_SINGLE_RANGE)) {
switch(eset[i]->code) { switch(eset[i]->code) {
case EFFECT_SET_BASE_ATTACK: case EFFECT_SET_BASE_ATTACK:
batk = eset[i]->get_value(this); batk = eset[i]->get_value(this);
...@@ -700,7 +700,7 @@ int32 card::get_base_defense() { ...@@ -700,7 +700,7 @@ int32 card::get_base_defense() {
filter_effect(EFFECT_SET_BASE_ATTACK, &eset, FALSE); filter_effect(EFFECT_SET_BASE_ATTACK, &eset, FALSE);
eset.sort(); eset.sort();
for(int32 i = 0; i < eset.size();) { for(int32 i = 0; i < eset.size();) {
if((eset[i]->type & EFFECT_TYPE_SINGLE) && eset[i]->is_flag(EFFECT_FLAG_SINGLE_RANGE)) { if(!(eset[i]->type & EFFECT_TYPE_SINGLE) || eset[i]->is_flag(EFFECT_FLAG_SINGLE_RANGE)) {
switch(eset[i]->code) { switch(eset[i]->code) {
case EFFECT_SET_BASE_ATTACK: case EFFECT_SET_BASE_ATTACK:
batk = eset[i]->get_value(this); batk = eset[i]->get_value(this);
...@@ -776,7 +776,7 @@ int32 card::get_defense() { ...@@ -776,7 +776,7 @@ int32 card::get_defense() {
rev = TRUE; rev = TRUE;
effect_set effects_def, effects_def_r; effect_set effects_def, effects_def_r;
for(int32 i = 0; i < eset.size();) { for(int32 i = 0; i < eset.size();) {
if((eset[i]->type & EFFECT_TYPE_SINGLE) && eset[i]->is_flag(EFFECT_FLAG_SINGLE_RANGE)) { if(!(eset[i]->type & EFFECT_TYPE_SINGLE) || eset[i]->is_flag(EFFECT_FLAG_SINGLE_RANGE)) {
switch(eset[i]->code) { switch(eset[i]->code) {
case EFFECT_SET_BASE_ATTACK: case EFFECT_SET_BASE_ATTACK:
batk = eset[i]->get_value(this); batk = eset[i]->get_value(this);
......
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