Commit 8158409b authored by wind2009's avatar wind2009

Fix

parent ee444bc3
Pipeline #42439 passed with stages
in 5 minutes and 51 seconds
No preview for this file type
......@@ -17,7 +17,7 @@ function s.initial_effect(c)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
--Fusion Summon
--synchro summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
......@@ -57,12 +57,16 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() or Duel.Destroy(c,REASON_EFFECT)==0 then return end
if not c:IsRelateToChain() or Duel.Destroy(c,REASON_EFFECT)==0 then return end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,2,REASON_EFFECT)==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
if dg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end
end
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -84,7 +88,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() or Duel.Destroy(c,REASON_EFFECT)==0 then return end
if not c:IsRelateToChain() or Duel.Destroy(c,REASON_EFFECT)==0 then return end
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
......@@ -100,7 +104,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsFaceup()
end
function s.thfilter(c)
return not c:IsCode(id) and c:IsSetCard(0x1ce,0x1d8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return not c:IsCode(id) and c:IsSetCard(0x1ce,0x1d8) and c:IsAbleToHand()
and c:IsFaceupEx()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -114,4 +118,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
end
......@@ -9,6 +9,7 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_END_PHASE)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
......@@ -94,4 +95,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
end
--終刻竜機XIII-グラフレイオ
--終刻竜機ⅩⅢ-グラフレイオ
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit()
--to hand
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
......@@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
......@@ -66,16 +66,16 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
if not (ac and ac:IsFaceup() and ac:IsSetCard(0x1ce)) then return false end
local bc=ac:GetBattleTarget()
e:SetLabelObject(bc)
return bc and bc:IsControler(1-tp) and bc:IsRelateToBattle()
return bc and bc:IsControler(1-tp) and bc:IsRelateToBattle() and bc:IsAbleToRemove(tp,POS_FACEDOWN)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc:IsAbleToRemove(tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,bc,1,0,0)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc and bc:IsControler(1-tp) and bc:IsRelateToBattle() then
if bc and bc:IsControler(1-tp) and bc:IsType(TYPE_MONSTER) and bc:IsRelateToBattle() then
Duel.Remove(bc,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -13,7 +13,6 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
......@@ -60,7 +59,6 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local fc=exg:Select(tp,1,1,nil):GetFirst()
e:SetLabel(fc:GetCode())
Duel.ConfirmCards(1-tp,fc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
......@@ -68,17 +66,18 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
local rc=rg:GetFirst()
if rc and Duel.Remove(rc,POS_FACEDOWN,REASON_EFFECT) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if rc and Duel.Remove(rc,POS_FACEDOWN,REASON_EFFECT)>0 and rc:IsLocation(LOCATION_REMOVED) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,cid)
local tc=g:GetFirst()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.BreakEffect()
local spchk=tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and ft>0
if tc:IsAbleToHand() and (not spchk or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
elseif spchk then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -94,4 +93,4 @@ function s.actcon(e)
end
function s.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
\ No newline at end of file
end
......@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetCountLimit(1)
e1:SetValue(s.valcon)
c:RegisterEffect(e1)
--Draw
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
......@@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.eqfilter2(c)
return c:IsFaceup()
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function s.lv_or_rk(c)
if c:IsLevelAbove(1) then
......@@ -67,24 +67,27 @@ function s.lv_or_rk(c)
end
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter2(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(s.eqfilter2,tp,LOCATION_MZONE,0,1,nil) end
and Duel.IsExistingTarget(s.eqfilter2,tp,LOCATION_MZONE,0,1,nil)
and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectTarget(tp,s.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
if s.lv_or_rk(tc)>0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,s.lv_or_rk(tc)*100)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
local lr=s.lv_or_rk(tc)
if lr>0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,lr*100)
end
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToChain() and tc:IsRelateToChain() and tc:IsFaceup()
and tc:IsControler(tp) and c:CheckUniqueOnField(tp)
if tc and c:IsRelateToChain() and tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER)
and aux.NecroValleyFilter()(c) and c:CheckUniqueOnField(tp)
and Duel.Equip(tp,c,tc) and s.lv_or_rk(tc)>0 then
Duel.BreakEffect()
Duel.Damage(tp,s.lv_or_rk(tc)*100,REASON_EFFECT)
end
end
\ No newline at end of file
end
--アルトメギア・インパスト -奪還-
--アルトメギア・インパスト-奪還-
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
......@@ -35,9 +36,9 @@ function s.rmsfilter(c)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rmsfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local g=Duel.GetMatchingGroup(s.rmsfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
......@@ -53,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if tc then
Duel.HintSelection(dg)
if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -64,15 +65,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
if Duel.NegateActivation(ev)
and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
and re:GetHandler():IsRelateToChain(ev) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if Duel.IsExistingMatchingCard(s.thfilter,tp,0,LOCATION_ONFIELD,1,nil)
and g:GetClassCount(Card.GetRace)>2
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local tg=Duel.GetMatchingGroup(s.thfilter,tp,0,LOCATION_ONFIELD,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
local rg=Duel.GetMatchingGroup(s.thfilter,tp,0,LOCATION_ONFIELD,nil)
if rg:GetCount()>0 and g:GetClassCount(Card.GetRace)>2 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.SendtoHand(rg,nil,REASON_EFFECT)
end
end
end
......@@ -83,4 +81,4 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
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