Commit 2908f6e5 authored by VanillaSalt's avatar VanillaSalt

clean

parent aca2dcc0
...@@ -629,14 +629,6 @@ uint32 card::check_xyz_level(card* pcard, uint32 lv) { ...@@ -629,14 +629,6 @@ uint32 card::check_xyz_level(card* pcard, uint32 lv) {
return (lev >> 16) & 0xffff; return (lev >> 16) & 0xffff;
return 0; return 0;
} }
uint32 card::get_base_attribute() {
int32 batt = data.attribute;
effect_set effects;
filter_effect(EFFECT_CHANGE_BASE_ATTRIBUTE, &effects);
if(effects.size())
batt = effects.get_last()->get_value(this);
return batt;
}
uint32 card::get_attribute() { uint32 card::get_attribute() {
if(assume_type == ASSUME_ATTRIBUTE) if(assume_type == ASSUME_ATTRIBUTE)
return assume_value; return assume_value;
...@@ -667,14 +659,6 @@ uint32 card::get_attribute() { ...@@ -667,14 +659,6 @@ uint32 card::get_attribute() {
temp.attribute = 0xffffffff; temp.attribute = 0xffffffff;
return attribute; return attribute;
} }
uint32 card::get_base_race() {
int32 brac = data.race;
effect_set effects;
filter_effect(EFFECT_CHANGE_BASE_RACE, &effects);
if(effects.size())
brac = effects.get_last()->get_value(this);
return brac;
}
uint32 card::get_race() { uint32 card::get_race() {
if(assume_type == ASSUME_RACE) if(assume_type == ASSUME_RACE)
return assume_value; return assume_value;
......
...@@ -153,9 +153,7 @@ public: ...@@ -153,9 +153,7 @@ public:
uint32 get_synchro_level(card* pcard); uint32 get_synchro_level(card* pcard);
uint32 get_ritual_level(card* pcard); uint32 get_ritual_level(card* pcard);
uint32 check_xyz_level(card* pcard, uint32 lv); uint32 check_xyz_level(card* pcard, uint32 lv);
uint32 get_base_attribute();
uint32 get_attribute(); uint32 get_attribute();
uint32 get_base_race();
uint32 get_race(); uint32 get_race();
uint32 get_lscale(); uint32 get_lscale();
uint32 get_rscale(); uint32 get_rscale();
......
...@@ -278,11 +278,9 @@ public: ...@@ -278,11 +278,9 @@ public:
#define EFFECT_ADD_RACE 120 // #define EFFECT_ADD_RACE 120 //
#define EFFECT_REMOVE_RACE 121 // #define EFFECT_REMOVE_RACE 121 //
#define EFFECT_CHANGE_RACE 122 // #define EFFECT_CHANGE_RACE 122 //
#define EFFECT_CHANGE_BASE_RACE 123 //
#define EFFECT_ADD_ATTRIBUTE 125 // #define EFFECT_ADD_ATTRIBUTE 125 //
#define EFFECT_REMOVE_ATTRIBUTE 126 // #define EFFECT_REMOVE_ATTRIBUTE 126 //
#define EFFECT_CHANGE_ATTRIBUTE 127 // #define EFFECT_CHANGE_ATTRIBUTE 127 //
#define EFFECT_CHANGE_BASE_ATTRIBUTE 128 //
#define EFFECT_UPDATE_LEVEL 130 // #define EFFECT_UPDATE_LEVEL 130 //
#define EFFECT_CHANGE_LEVEL 131 // #define EFFECT_CHANGE_LEVEL 131 //
#define EFFECT_UPDATE_RANK 132 // #define EFFECT_UPDATE_RANK 132 //
...@@ -438,8 +436,6 @@ public: ...@@ -438,8 +436,6 @@ public:
#define EVENT_LEVEL_UP 1200 #define EVENT_LEVEL_UP 1200
#define EVENT_PAY_LPCOST 1201 #define EVENT_PAY_LPCOST 1201
#define EVENT_DETACH_MATERIAL 1202 #define EVENT_DETACH_MATERIAL 1202
#define EVENT_CONFIRM_DECKTOP 1203
#define EVENT_CONFIRM_CARDS 1204
#define EVENT_TURN_END 1210 #define EVENT_TURN_END 1210
#define EVENT_PHASE 0x1000 #define EVENT_PHASE 0x1000
#define EVENT_PHASE_START 0x2000 #define EVENT_PHASE_START 0x2000
......
...@@ -651,7 +651,6 @@ int32 scriptlib::duel_confirm_decktop(lua_State *L) { ...@@ -651,7 +651,6 @@ int32 scriptlib::duel_confirm_decktop(lua_State *L) {
} }
} }
} }
field::card_set cset;
auto cit = pduel->game_field->player[playerid].list_main.rbegin(); auto cit = pduel->game_field->player[playerid].list_main.rbegin();
pduel->write_buffer8(MSG_CONFIRM_DECKTOP); pduel->write_buffer8(MSG_CONFIRM_DECKTOP);
pduel->write_buffer8(playerid); pduel->write_buffer8(playerid);
...@@ -661,10 +660,8 @@ int32 scriptlib::duel_confirm_decktop(lua_State *L) { ...@@ -661,10 +660,8 @@ int32 scriptlib::duel_confirm_decktop(lua_State *L) {
pduel->write_buffer8((*cit)->current.controler); pduel->write_buffer8((*cit)->current.controler);
pduel->write_buffer8((*cit)->current.location); pduel->write_buffer8((*cit)->current.location);
pduel->write_buffer8((*cit)->current.sequence); pduel->write_buffer8((*cit)->current.sequence);
cset.insert(*cit);
} }
pduel->game_field->raise_event(&cset, EVENT_CONFIRM_DECKTOP, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0); pduel->game_field->add_process(PROCESSOR_WAIT, 0, 0, 0, 0, 0);
pduel->game_field->process_instant_event();
return lua_yield(L, 0); return lua_yield(L, 0);
} }
int32 scriptlib::duel_confirm_cards(lua_State *L) { int32 scriptlib::duel_confirm_cards(lua_State *L) {
...@@ -702,11 +699,7 @@ int32 scriptlib::duel_confirm_cards(lua_State *L) { ...@@ -702,11 +699,7 @@ int32 scriptlib::duel_confirm_cards(lua_State *L) {
pduel->write_buffer8((*cit)->current.sequence); pduel->write_buffer8((*cit)->current.sequence);
} }
} }
if(pcard) pduel->game_field->add_process(PROCESSOR_WAIT, 0, 0, 0, 0, 0);
pduel->game_field->raise_event(pcard, EVENT_CONFIRM_CARDS, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0);
else
pduel->game_field->raise_event(&pgroup->container, EVENT_CONFIRM_CARDS, pduel->game_field->core.reason_effect, 0, pduel->game_field->core.reason_player, 0, 0);
pduel->game_field->process_instant_event();
return lua_yield(L, 0); return lua_yield(L, 0);
} }
int32 scriptlib::duel_sort_decktop(lua_State *L) { int32 scriptlib::duel_sort_decktop(lua_State *L) {
......
...@@ -530,8 +530,6 @@ EVENT_TOSS_DICE_NEGATE =1153 --掷骰子被无效时 ...@@ -530,8 +530,6 @@ EVENT_TOSS_DICE_NEGATE =1153 --掷骰子被无效时
EVENT_LEVEL_UP =1200 --等级上升时 EVENT_LEVEL_UP =1200 --等级上升时
EVENT_PAY_LPCOST =1201 --支付生命值时 EVENT_PAY_LPCOST =1201 --支付生命值时
EVENT_DETACH_MATERIAL =1202 --去除超量素材时 EVENT_DETACH_MATERIAL =1202 --去除超量素材时
EVENT_CONFIRM_DECKTOP =1203 --确认卡组最上方时
EVENT_CONFIRM_CARDS =1204 --确认卡时
EVENT_TURN_END =1210 --回合结束时 EVENT_TURN_END =1210 --回合结束时
EVENT_PHASE =0x1000 --阶段结束时 EVENT_PHASE =0x1000 --阶段结束时
EVENT_PHASE_START =0x2000 --阶段开始时 EVENT_PHASE_START =0x2000 --阶段开始时
......
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