Commit 61bf5a9b authored by mercury233's avatar mercury233 Committed by GitHub

add RACE_ILLUSION, RACES_COUNT (#495)

parent bf2339ce
......@@ -107,6 +107,8 @@ struct card_sort {
#define ATTRIBUTE_DEVINE 0x40 //
//Races
#define RACES_COUNT 26
#define RACE_ALL 0x3ffffff
#define RACE_WARRIOR 0x1 //
#define RACE_SPELLCASTER 0x2 //
#define RACE_FAIRY 0x4 //
......@@ -132,6 +134,7 @@ struct card_sort {
#define RACE_CREATORGOD 0x400000 //
#define RACE_WYRM 0x800000 //
#define RACE_CYBERSE 0x1000000 //
#define RACE_ILLUSION 0x2000000 //
//Reason
#define REASON_DESTROY 0x1 //
......
......@@ -753,7 +753,7 @@ int32 field::sort_card(int16 step, uint8 playerid) {
int32 field::announce_race(int16 step, uint8 playerid, int32 count, int32 available) {
if(step == 0) {
int32 scount = 0;
for(int32 ft = 0x1; ft != 0x2000000; ft <<= 1) {
for(int32 ft = 0x1; ft < (1 << RACES_COUNT); ft <<= 1) {
if(ft & available)
scount++;
}
......@@ -769,7 +769,7 @@ int32 field::announce_race(int16 step, uint8 playerid, int32 count, int32 availa
} else {
int32 rc = returns.ivalue[0];
int32 sel = 0;
for(int32 ft = 0x1; ft != 0x2000000; ft <<= 1) {
for(int32 ft = 0x1; ft < (1 << RACES_COUNT); ft <<= 1) {
if(!(ft & rc)) continue;
if(!(ft & available)) {
pduel->write_buffer8(MSG_RETRY);
......
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