Commit 986b1e9b authored by salix5's avatar salix5

atk/attr/race

parent 55a5ac91
...@@ -300,9 +300,9 @@ uint32 card::get_type() { ...@@ -300,9 +300,9 @@ uint32 card::get_type() {
return type; return type;
} }
int32 card::get_base_attack(uint8 swap) { int32 card::get_base_attack(uint8 swap) {
if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER)) if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER))
return 0; return 0;
if (current.location != LOCATION_MZONE) if (current.location != LOCATION_MZONE && !(get_type() & TYPE_MONSTER))
return data.attack; return data.attack;
if (temp.base_attack != -1) if (temp.base_attack != -1)
return temp.base_attack; return temp.base_attack;
...@@ -330,7 +330,7 @@ int32 card::get_attack(uint8 swap) { ...@@ -330,7 +330,7 @@ int32 card::get_attack(uint8 swap) {
return assume_value; return assume_value;
if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER))
return 0; return 0;
if (current.location != LOCATION_MZONE) if (current.location != LOCATION_MZONE && !(get_type() & TYPE_MONSTER))
return data.attack; return data.attack;
if (temp.attack != -1) if (temp.attack != -1)
return temp.attack; return temp.attack;
...@@ -400,9 +400,9 @@ int32 card::get_attack(uint8 swap) { ...@@ -400,9 +400,9 @@ int32 card::get_attack(uint8 swap) {
return atk; return atk;
} }
int32 card::get_base_defence(uint8 swap) { int32 card::get_base_defence(uint8 swap) {
if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER)) if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER))
return 0; return 0;
if (current.location != LOCATION_MZONE) if (current.location != LOCATION_MZONE && !(get_type() & TYPE_MONSTER))
return data.defence; return data.defence;
if (temp.base_defence != -1) if (temp.base_defence != -1)
return temp.base_defence; return temp.base_defence;
...@@ -430,7 +430,7 @@ int32 card::get_defence(uint8 swap) { ...@@ -430,7 +430,7 @@ int32 card::get_defence(uint8 swap) {
return assume_value; return assume_value;
if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) if (current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER))
return 0; return 0;
if (current.location != LOCATION_MZONE) if (current.location != LOCATION_MZONE && !(get_type() & TYPE_MONSTER))
return data.defence; return data.defence;
if (temp.defence != -1) if (temp.defence != -1)
return temp.defence; return temp.defence;
...@@ -505,7 +505,7 @@ uint32 card::get_level() { ...@@ -505,7 +505,7 @@ uint32 card::get_level() {
return 0; return 0;
if(assume_type == ASSUME_LEVEL) if(assume_type == ASSUME_LEVEL)
return assume_value; return assume_value;
if(!(current.location & (LOCATION_MZONE + LOCATION_HAND))) if(!(current.location & (LOCATION_MZONE + LOCATION_HAND)) && !(get_type() & TYPE_MONSTER))
return data.level; return data.level;
if (temp.level != 0xffffffff) if (temp.level != 0xffffffff)
return temp.level; return temp.level;
...@@ -639,7 +639,7 @@ uint32 card::get_attribute() { ...@@ -639,7 +639,7 @@ uint32 card::get_attribute() {
return assume_value; return assume_value;
if(current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) if(current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER))
return 0; return 0;
if(!(current.location & (LOCATION_MZONE + LOCATION_GRAVE))) if(!(current.location & (LOCATION_MZONE + LOCATION_GRAVE)) && !(get_type() & TYPE_MONSTER))
return data.attribute; return data.attribute;
if (temp.attribute != 0xffffffff) if (temp.attribute != 0xffffffff)
return temp.attribute; return temp.attribute;
...@@ -677,7 +677,7 @@ uint32 card::get_race() { ...@@ -677,7 +677,7 @@ uint32 card::get_race() {
return assume_value; return assume_value;
if(current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER)) if(current.location != LOCATION_MZONE && !(data.type & TYPE_MONSTER) && !(get_type() & TYPE_MONSTER))
return 0; return 0;
if(!(current.location & (LOCATION_MZONE + LOCATION_GRAVE))) if(!(current.location & (LOCATION_MZONE + LOCATION_GRAVE)) && !(get_type() & TYPE_MONSTER))
return data.race; return data.race;
if (temp.race != 0xffffffff) if (temp.race != 0xffffffff)
return temp.race; return temp.race;
......
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