Commit 6c00fe42 authored by nekrozar's avatar nekrozar

fix

parent fe7e9928
......@@ -11,7 +11,7 @@ function c1475311.initial_effect(c)
c:RegisterEffect(e1)
end
function c1475311.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanDraw(tp,2) end
if chk==0 then return Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
......
......@@ -27,12 +27,12 @@ function c15693423.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if e:GetHandler():IsLocation(LOCATION_HAND) then ct=ct-1 end
if chk==0 then return not Duel.IsPlayerCanRemove(1-tp)
if chk==0 then return Duel.IsPlayerCanRemove(1-tp)
and ct>0 and g:IsExists(c15693423.rmfilter,1,nil,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0)
end
function c15693423.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanRemove(1-tp) then return end
if not Duel.IsPlayerCanRemove(1-tp) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if ct>0 then
......
......@@ -15,7 +15,7 @@ function c26557451.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and r&REASON_EFFECT~=0 and rp==1-tp
end
function c26557451.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerCanRemove(tp) end
if chk==0 then return Duel.IsPlayerCanRemove(tp) end
local g=eg:Filter(Card.IsControler,nil,1-tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_HAND)
......
......@@ -11,7 +11,7 @@ function c40465719.initial_effect(c)
c:RegisterEffect(e1)
end
function c40465719.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanDraw(tp,2) end
if chk==0 then return Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
......
......@@ -31,7 +31,7 @@ function c51858306.filter(c)
and c:IsAbleToRemove()
end
function c51858306.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanRemove(tp) then return end
if not Duel.IsPlayerCanRemove(tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c51858306.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
......
......@@ -53,13 +53,13 @@ function c58820923.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c58820923.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2
and not Duel.IsPlayerCanRemove(1-tp) end
and Duel.IsPlayerCanRemove(1-tp) end
end
function c58820923.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c58820923.rmop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanRemove(1-tp) then return end
if not Duel.IsPlayerCanRemove(1-tp) then return end
local g=Duel.GetMatchingGroup(c58820923.rmfilter,1-tp,LOCATION_DECK,0,nil)
if g:GetCount()>2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
......
......@@ -23,7 +23,7 @@ function c62015408.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c62015408.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerCanRemove(tp)
if chk==0 then return Duel.IsPlayerCanRemove(tp)
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)>0
and Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
......
--超こいこい
--超こいこい
function c66171432.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -25,14 +25,14 @@ function c66171432.filter(c,e,tp)
return c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c66171432.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerCanRemove(tp)
if chk==0 then return Duel.IsPlayerCanRemove(tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c66171432.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function c66171432.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsPlayerCanRemove(tp) then return end
if not Duel.IsPlayerCanRemove(tp) then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
local sg=g:Filter(c66171432.filter,nil,e,tp)
......
......@@ -21,12 +21,12 @@ function c90506641.filter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function c90506641.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerCanRemove(tp)
if chk==0 then return Duel.IsPlayerCanRemove(tp)
and Duel.IsExistingMatchingCard(c90506641.filter,tp,LOCATION_DECK,0,5,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c90506641.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanRemove(tp) then return end
if not Duel.IsPlayerCanRemove(tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90506641,0))
local g=Duel.SelectMatchingCard(tp,c90506641.filter,tp,LOCATION_DECK,0,5,5,nil)
if g:GetCount()<5 then return end
......
......@@ -1448,7 +1448,7 @@ function Auxiliary.RitualCheckEqual(g,c,lv)
end
function Auxiliary.RitualCheck(g,tp,c,lv,greater_or_equal)
return Auxiliary["RitualCheck"..greater_or_equal](g,c,lv) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
end
end
function Auxiliary.RitualCheckAdditionalLevel(c,rc)
local raw_level=c:GetRitualLevel(rc)
local lv1=raw_level&0xffff
......@@ -1460,7 +1460,7 @@ function Auxiliary.RitualCheckAdditionalLevel(c,rc)
end
end
function Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
if greater_or_equal=="Equal" then
if greater_or_equal=="Equal" then
return function(g)
return g:GetSum(Auxiliary.RitualCheckAdditionalLevel,c)<=lv
end
......@@ -2193,6 +2193,6 @@ end
--condition of "negate activation and banish"
function Auxiliary.nbcon(tp,re)
local rc=re:GetHandler()
return not Duel.IsPlayerCanRemove(tp)
return Duel.IsPlayerCanRemove(tp)
and (not rc:IsRelateToEffect(re) or rc:IsAbleToRemove())
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