Commit dda128da authored by VanillaSalt's avatar VanillaSalt

fix

parent 398e555d
......@@ -90,12 +90,12 @@ function c21105106.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c21105106.filter(c,fc,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetRitualLevel(fc)==c:GetLevel()
function c21105106.filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function c21105106.ritual_custom_condition(c,mg)
local tp=c:GetControler()
local g=mg:Filter(c21105106.filter,c,c,tp)
local g=mg:Filter(c21105106.filter,c,tp)
return g:IsExists(c21105106.ritfilter1,1,nil,c:GetLevel(),g)
end
function c21105106.ritfilter1(c,lv,mg)
......@@ -119,7 +119,7 @@ end
function c21105106.ritual_custom_operation(c,mg)
local tp=c:GetControler()
local lv=c:GetLevel()
local g=mg:Filter(c21105106.filter,c,c,tp)
local g=mg:Filter(c21105106.filter,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=g:FilterSelect(tp,c21105106.ritfilter1,1,1,nil,lv,g)
local tc1=g1:GetFirst()
......
......@@ -29,22 +29,21 @@ function c32542011.desfilter(c)
return c:IsDestructable()
end
function c32542011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
(Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil))
or
(Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(c32542011.spfilter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount(),e,tp))
end
if Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE) then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b1=Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER)
and ft>0 and Duel.IsExistingMatchingCard(c32542011.spfilter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount(),e,tp)
if chk==0 then return b1 or b2 end
if b1 then
local g=Duel.GetMatchingGroup(c32542011.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
if Duel.IsExistingMatchingCard(c32542011.cfilter2,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER) then
if b2 then
local g=Duel.GetMatchingGroup(c32542011.spfilter,tp,LOCATION_GRAVE,0,nil,Duel.GetTurnCount(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,Duel.GetLocationCount(tp,LOCATION_MZONE),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,ft,0,0)
local dg=Duel.GetMatchingGroup(c32542011.desfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
end
end
function c32542011.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -95,9 +95,10 @@ function c36415522.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsRelateToBattle() and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(1)
e1:SetCondition(c36415522.damcon)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
......
......@@ -45,49 +45,37 @@ function c39823987.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c39823987.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c39823987.spcon1)
e1:SetOperation(c39823987.spop1)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c39823987.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel()
end
function c39823987.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c39823987.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(39823987,1)) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(39823987,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetTarget(c39823987.sptg2)
e1:SetOperation(c39823987.spop2)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c39823987.spcon)
e1:SetTarget(c39823987.sptg)
e1:SetOperation(c39823987.spop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetLabel(Duel.GetTurnCount())
Duel.RegisterEffect(e1,tp)
end
end
function c39823987.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel()
end
function c39823987.spfilter(c,e,tp)
return c:IsCode(66818682) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c39823987.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c39823987.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39823987.spfilter(chkc,e,tp) end
if chk==0 then return true end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c39823987.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c39823987.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c39823987.spop2(e,tp,eg,ep,ev,re,r,rp)
function c39823987.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -39,7 +39,7 @@ function c74416026.activate(e,tp,eg,ep,ev,re,r,rp)
if tg:GetCount()>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(74416026,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=tg:Select(tp,1,1,nil)
local tc=tg:Select(tp,1,1,nil):GetFirst()
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_GRAVE) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil):GetFirst()
......
......@@ -4,10 +4,14 @@ function c811734.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c811734.condition)
e1:SetTarget(c811734.target)
e1:SetOperation(c811734.activate)
c:RegisterEffect(e1)
end
function c811734.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c811734.atkfilter(c)
return c:IsSetCard(0x10af) and c:GetAttack()>0 and c: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