Commit ea78aec2 authored by wind2009's avatar wind2009

Fix

parent 94bf5384
Pipeline #41748 passed with stages
in 2 minutes and 57 seconds
No preview for this file type
...@@ -16,17 +16,17 @@ function s.initial_effect(c) ...@@ -16,17 +16,17 @@ function s.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --grant effect
local e2=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,id+o) e3:SetCountLimit(1,id+o)
e2:SetCondition(s.eacon) e3:SetCondition(s.eacon)
e2:SetTarget(s.eatg) e3:SetTarget(s.eatg)
e2:SetOperation(s.eaop) e3:SetOperation(s.eaop)
c:RegisterEffect(e2) c:RegisterEffect(e3)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
...@@ -85,7 +85,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,7 +85,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
local tg=g:Filter(s.desfilter,nil,e:GetLabel()) local tg=g:Filter(s.desfilter,nil,e:GetLabel())
Duel.Destroy(tg,REASON_EFFECT) Duel.Destroy(tg,REASON_EFFECT)
g:DeleteGroup()
end end
function s.eacon(e,tp,eg,ep,ev,re,r,rp) function s.eacon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
......
...@@ -63,6 +63,7 @@ function s.thfilter(c) ...@@ -63,6 +63,7 @@ function s.thfilter(c)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
...@@ -74,17 +75,15 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,17 +75,15 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.sccon(e,tp,eg,ep,ev,re,r,rp) function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() return Duel.GetTurnPlayer()~=tp and (Duel.IsMainPhase() or Duel.IsBattlePhase())
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (Duel.IsMainPhase() or Duel.IsBattlePhase())
end end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_MZONE,0,nil,ATTRIBUTE_EARTH) local mg=Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_MZONE,0,nil,ATTRIBUTE_EARTH)
return not c:IsStatus(STATUS_CHAINING) return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c,mg)
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c,mg)
end end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.scop(e,tp,eg,ep,ev,re,r,rp) function s.scop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -32,7 +32,6 @@ function s.initial_effect(c) ...@@ -32,7 +32,6 @@ function s.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(s.descon) e3:SetCondition(s.descon)
e3:SetCost(s.descost)
e3:SetTarget(s.destg) e3:SetTarget(s.destg)
e3:SetOperation(s.desop) e3:SetOperation(s.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -82,13 +81,27 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,13 +81,27 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep==1-tp and ep==1-tp
end end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) function s.desfilter(c,rc)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x100d) end return c:GetEquipTarget()~=rc and c~=rc
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x100d) end
Duel.Release(g,REASON_COST) function s.costfilter(c,tp)
if not c:IsSetCard(0x100d) then return false end
return Duel.IsExistingTarget(s.desfilter,tp,0,LOCATION_ONFIELD,1,c,c)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end local c=e:GetHandler()
if chk==0 then
if e:IsCostChecked() then
return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,tp)
else
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
end
end
if e:IsCostChecked() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
......
...@@ -27,7 +27,7 @@ function s.initial_effect(c) ...@@ -27,7 +27,7 @@ function s.initial_effect(c)
e2:SetTarget(s.dhtg) e2:SetTarget(s.dhtg)
e2:SetOperation(s.dhop) e2:SetOperation(s.dhop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--negate attack --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
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