Commit 70c4817b authored by wind2009's avatar wind2009

Fix

parent 648be910
......@@ -57,7 +57,6 @@ function s.initial_effect(c)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.rspcon)
e4:SetCost(s.rspcost)
e4:SetTarget(s.rsptg)
e4:SetOperation(s.rspop)
c:RegisterEffect(e4)
......@@ -80,7 +79,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)~=0
end
function s.thfilter(c)
return not c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x196) and c:IsAbleToHand()
return not c:IsAllTypes(TYPE_PENDULUM+TYPE_MONSTER) and c:IsSetCard(0x196) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -138,22 +137,13 @@ end
function s.rspcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function s.rspcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function s.rfilter(c)
return c:IsSetCard(0x197) and c:IsAllTypes(TYPE_RITUAL+TYPE_SPELL) and c:CheckActivateEffect(false,true,false)~=nil and c:IsAbleToRemoveAsCost()
end
function s.rsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return c:GetFlagEffect(id)==0 and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end
e:SetLabel(0)
if chk==0 then return e:IsCostChecked() and c:GetFlagEffect(id)==0
and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
c:RegisterFlagEffect(id,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
......
......@@ -53,7 +53,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
......
......@@ -51,8 +51,7 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=aux.ExceptThisCard(e)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,ec)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,aux.ExceptThisCard(e))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)>0 and c:IsRelateToChain() then
......
......@@ -37,7 +37,7 @@ function s.initial_effect(c)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.ttcon(e,c,minc)
function s.ttcon(e,c,minc)
if c==nil then return true end
local min,max=c:GetTributeRequirement()
return min<=1 and Duel.CheckTribute(c,1)
......@@ -50,6 +50,19 @@ end
function s.eftg(e,c)
return c:GetOriginalLevel()<=4 and (c:IsAttackAbove(1351) or c:IsDefenseAbove(1351))
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c then tc=Duel.GetAttackTarget() end
if chk==0 then return tc and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c then tc=Duel.GetAttackTarget() end
if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
......@@ -68,16 +81,3 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c then tc=Duel.GetAttackTarget() end
if chk==0 then return tc and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c then tc=Duel.GetAttackTarget() end
if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end
end
......@@ -15,7 +15,7 @@ function s.initial_effect(c)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+o)
......
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