Commit 298f9a48 authored by argon.sun's avatar argon.sun

fix

parent 0fce3399
...@@ -332,7 +332,7 @@ int32 scriptlib::card_is_type(lua_State *L) { ...@@ -332,7 +332,7 @@ int32 scriptlib::card_is_type(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
uint32 ttype = lua_tointeger(L, 2); uint32 ttype = lua_tointeger(L, 2);
if(pcard->get_type()&ttype) if(pcard->get_type() & ttype)
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
else else
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
...@@ -343,7 +343,7 @@ int32 scriptlib::card_is_race(lua_State *L) { ...@@ -343,7 +343,7 @@ int32 scriptlib::card_is_race(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
uint32 trace = lua_tointeger(L, 2); uint32 trace = lua_tointeger(L, 2);
if(pcard->get_race()&trace) if(pcard->get_race() & trace)
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
else else
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
...@@ -354,7 +354,7 @@ int32 scriptlib::card_is_attribute(lua_State *L) { ...@@ -354,7 +354,7 @@ int32 scriptlib::card_is_attribute(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
uint32 tattrib = lua_tointeger(L, 2); uint32 tattrib = lua_tointeger(L, 2);
if(pcard->get_attribute()&tattrib) if(pcard->get_attribute() & tattrib)
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
else else
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
......
...@@ -25,7 +25,7 @@ function c31766317.rfilter(c) ...@@ -25,7 +25,7 @@ function c31766317.rfilter(c)
end end
function c31766317.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c31766317.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local dc=eg:GetFirst() local dc=eg:GetFirst()
if chk==0 then return eg:GetCount()==1 and dc~=e:GetHandler() and dc:IsRace(RACE_FIEND) and dc:IsAttribute(ATTRIBUTE_DARK) if chk==0 then return eg:GetCount()==1 and dc~=e:GetHandler() and dc:IsFaceup() and dc:IsRace(RACE_FIEND) and dc:IsAttribute(ATTRIBUTE_DARK)
and Duel.IsExistingMatchingCard(c31766317.rfilter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingMatchingCard(c31766317.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectYesNo(tp,aux.Stringid(31766317,0)) then if Duel.SelectYesNo(tp,aux.Stringid(31766317,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
...@@ -26,7 +26,7 @@ function c45458027.spcon(e,c) ...@@ -26,7 +26,7 @@ function c45458027.spcon(e,c)
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
return g:GetCount()>0 and not g:IsExists(Card.IsRace,1,nil,0xffffffff-RACE_MACHINE) return g:GetCount()>0 and not g:IsExists(Card.IsRace,1,nil,0xffffff-RACE_MACHINE)
end end
function c45458027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45458027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end
......
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