Commit 061e04c1 authored by POLYMER's avatar POLYMER

fix

parent b3810254
......@@ -75,16 +75,17 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(cm.filter,1,nil,tp) and Duel.IsChainNegatable(ev) and not e:GetHandler():IsPublic() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
return g and g:IsExists(cm.filter,1,nil,tp) and Duel.IsChainNegatable(ev) and not e:GetHandler():IsPublic()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) and e:GetHandler():IsRelateToEffect(e) then
if Duel.SpecialSummon(e:GetHandler(),SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP) then
e:GetHandler():SetMaterial(nil)
if Duel.SpecialSummon(e:GetHandler(),SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)>0 then
e:GetHandler():CompleteProcedure()
end
end
......
......@@ -158,5 +158,6 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)>0 then tc:CompleteProcedure() end
end
\ No newline at end of file
......@@ -272,6 +272,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local sumtype=c:GetSummonType()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) and sumtype&SUMMON_TYPE_ADVANCE>0 and g and #g>0 then
local tc=g:GetFirst()
if tc:IsFaceup() and tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA) and tc:IsReason(REASON_SUMMON) and tc:GetReasonCard()==c and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)>0 then tc:CompleteProcedure() end
if tc:IsFaceup() and tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA) and tc:IsReason(REASON_SUMMON) and tc:GetReasonCard()==c and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)>0 then tc:CompleteProcedure() end
end
end
end
\ No newline at end of file
......@@ -25,10 +25,10 @@ function c72410780.initial_effect(c)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c72410770.con)
e4:SetCondition(c72410780.con)
e4:SetCost(c72410780.discost)
e4:SetTarget(c72410770.target)
e4:SetOperation(c72410770.operation)
e4:SetTarget(c72410780.target)
e4:SetOperation(c72410780.operation)
c:RegisterEffect(e4)
end
c72410780.toss_dice=true
......@@ -39,14 +39,14 @@ function c72410780.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c72410770.con(e,tp,eg,ep,ev,re,r,rp)
function c72410780.con(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c72410770.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c72410780.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c72410770.operation(e,tp,eg,ep,ev,re,r,rp)
function c72410780.operation(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.TossDice(tp,1)
if d==1 or d==2 then
Duel.Damage(1-tp,3000,REASON_EFFECT)
......
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