Commit 800a8810 authored by DailyShana's avatar DailyShana

fix get_draw_count

close Fluorohydride/ygopro-scripts#1412
parent 259732f5
...@@ -1798,10 +1798,13 @@ int32 field::get_summon_count_limit(uint8 playerid) { ...@@ -1798,10 +1798,13 @@ int32 field::get_summon_count_limit(uint8 playerid) {
} }
int32 field::get_draw_count(uint8 playerid) { int32 field::get_draw_count(uint8 playerid) {
effect_set eset; effect_set eset;
filter_player_effect(infos.turn_player, EFFECT_DRAW_COUNT, &eset); filter_player_effect(playerid, EFFECT_DRAW_COUNT, &eset);
int32 count = player[playerid].draw_count; int32 count = player[playerid].draw_count;
if(eset.size()) for(int32 i = 0; i < eset.size(); ++i) {
count = eset.get_last()->get_value(); int32 c = eset[i]->get_value();
if(c > count)
count = c;
}
return count; return count;
} }
void field::get_ritual_material(uint8 playerid, effect* peffect, card_set* material) { void field::get_ritual_material(uint8 playerid, effect* peffect, card_set* material) {
......
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