Commit a678477e authored by sidschingis's avatar sidschingis

Update libcard.cpp

parent fa3a227c
......@@ -1617,7 +1617,10 @@ int32 scriptlib::card_add_counter(lua_State *L) {
card* pcard = *(card**) lua_touserdata(L, 1);
uint32 countertype = lua_tointeger(L, 2);
uint32 count = lua_tointeger(L, 3);
if(pcard->is_affect_by_effect(pcard->pduel->game_field->core.reason_effect))
field* game_field = pcard->pduel->game_field;
uint8 player = game_field->core.reason_player;
if(pcard->is_affect_by_effect(game_field->core.reason_effect)
&& game_field->is_player_can_place_counter(player,pcard,countertype,count))
lua_pushboolean(L, pcard->add_counter(countertype, count));
else lua_pushboolean(L, 0);
return 1;
......
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