Commit 9027f5e4 authored by Nemo Ma's avatar Nemo Ma

fix del

parent 81b438f6
No preview for this file type
......@@ -15,7 +15,7 @@ function c12057604.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FIELD)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c12057604.thcon)
......
--方舟骑士怒号光明
function c29065512.initial_effect(c)
aux.AddCodeList(c,29065500,29065505)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29065512+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c29065512.target)
e1:SetOperation(c29065512.activate)
c:RegisterEffect(e1)
end
function c29065512.filter1(c,e,tp)
return c:IsFaceup() and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c29065512.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetOriginalCode())
end
function c29065512.filter2(c,e,tp,mc,code)
return aux.IsCodeListed(c,code) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c29065512.filter3(c,code)
return c:IsCode(code) and c:IsFaceup()
end
function c29065512.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065512.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local ct=0
if Duel.IsExistingMatchingCard(c29065512.filter3,tp,LOCATION_MZONE,0,1,nil,29065500) then ct=ct+1 end
if Duel.IsExistingMatchingCard(c29065512.filter3,tp,LOCATION_MZONE,0,1,nil,29065505) then ct=ct+1 end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and ct>0 then
e:SetLabel(1)
if ct==2 then
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end
else
e:SetLabel(0)
e:SetProperty(0)
end
end
function c29065512.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=1
if e:GetLabel()==1 then ct=2 end
while ct>0 do
local g1=Duel.GetMatchingGroup(c29065512.filter1,tp,LOCATION_MZONE,0,nil,e,tp)
if g1:GetCount()==0 then return end
local tc=g1:Select(tp,1,1,nil):GetFirst()
if not tc or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c29065512.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetOriginalCode())
local sc=g2:GetFirst()
if not sc then return end
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
ct=ct-1
g1=Duel.GetMatchingGroup(c29065512.filter1,tp,LOCATION_MZONE,0,nil,e,tp)
if ct==0 or g1:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(29065512,0)) then return end
Duel.BreakEffect()
end
end
local m=29065518
local cm=_G["c"..m]
cm.name="方舟骑士苦难行进"
cm.named_with_Arknight=1
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,29065518)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,29065519)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and #g>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(p,nil,p,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Draw(p,1,REASON_EFFECT)
if g:GetFirst():IsSetCard(0x87af) then
if Duel.GetFlagEffect(tp,29065518)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(cm.detg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,29065518,RESET_PHASE+PHASE_END,0,1)
end
end
end
end
function cm.detg(e,c)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function cm.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--方舟骑士-菲亚梅塔·炽炎无霾
function c29065544.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,29065543,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),1,true,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetValue(c29065544.atlimit)
e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(99)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c29065544.spcon)
e3:SetTarget(c29065544.sptg)
e3:SetOperation(c29065544.spop)
c:RegisterEffect(e3)
end
function c29065544.atlimit(e,c)
return not e:GetHandler():GetColumnGroup():IsContains(c)
end
function c29065544.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c29065544.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c29065544.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(29065543)
end
function c29065544.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c29065544.spfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(29065544,1)) then
local sg=Duel.SelectMatchingCard(tp,c29065544.spfil,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
......@@ -87,7 +87,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
ct3=Duel.SendtoGrave(g,REASON_EFFECT)
end
local ct4=ct2+ct3
Duel.Recover(tp,ct4*100,REASON_EFFECT)
Duel.Damage(tp,500*ct4,REASON_EFFECT)
Duel.Damage(1-tp,500*ct4,REASON_EFFECT)
end
......
--樱花进王
function c64800115.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c64800115.con)
e1:SetOperation(c64800115.op)
c:RegisterEffect(e1)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64800115,1))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c64800115.tgcon)
e3:SetOperation(c64800115.tgop)
c:RegisterEffect(e3)
end
function c64800115.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.GetFlagEffect(tp,c:GetOriginalCode())==0
end
function c64800115.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,e:GetHandler():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1)
if not (c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD)) then return end
local op=3
op=Duel.SelectOption(tp,aux.Stringid(64800115,0),aux.Stringid(64800115,1),aux.Stringid(64800115,2),aux.Stringid(64800115,3))
if op==0 then
local e0=Effect.CreateEffect(c)
--double atk
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e0:SetRange(LOCATION_MZONE)
e0:SetCost(c64800115.atkcost2)
e0:SetOperation(c64800115.atkop2)
c:RegisterEffect(e0)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(64800115,0))
end
if op==1 then
--double damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(64800115,1))
end
if op==2 then
--extra attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(64800115,2))
end
end
function c64800115.atkcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(64810115)==0 end
c:RegisterFlagEffect(64810115,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c64800115.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsLocation(LOCATION_MZONE) then
local atk=c:GetAttack()*2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(atk)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_DISABLE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e3)
end
end
--e3
function c64800115.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAbleToGrave() and c:GetBattledGroupCount()>0
end
function c64800115.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAbleToGrave() then
Duel.SendtoGrave(c,REASON_EFFECT)
end
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