Commit 57fb26b9 authored by 大崎甜花's avatar 大崎甜花 Committed by GitHub

Update c14000060.lua

parent c172b8ce
......@@ -2,91 +2,91 @@
local m=14000060
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,14000055,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),1,true,false)
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE)
e1:SetValue(14000055)
c:RegisterEffect(e1)
--banish extra
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.extg)
e2:SetOperation(cm.exop)
c:RegisterEffect(e2)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,14000055,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),1,true,false)
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE)
e1:SetValue(14000055)
c:RegisterEffect(e1)
--banish extra
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.extg)
e2:SetOperation(cm.exop)
c:RegisterEffect(e2)
end
function cm.ORI(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Origic
local m=_G["c"..c:GetCode()]
return m and m.named_with_Origic
end
function cm.tdfilter(c)
return c:IsFaceup() and cm.ORI(c) and c:IsAbleToDeck()
return c:IsFaceup() and cm.ORI(c) and c:IsAbleToDeck()
end
function cm.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function cm.extg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,0,LOCATION_EXTRA,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,0,LOCATION_EXTRA,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end
function cm.exop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local boo1=0
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then
boo1=1
end
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsType(TYPE_MONSTER) then
if boo1==1 then
local batk=tc:GetBaseAttack()
local batt=tc:GetOriginalAttribute()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(batt)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(batk)
c:RegisterEffect(e2)
end
end
if boo1==1 and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
if Duel.SendtoDeck(g,tp,2,REASON_EFFECT)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetTargetRange(0,1)
e3:SetTarget(cm.sumlimit)
c:RegisterEffect(e3)
c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
end
end
local c=e:GetHandler()
local boo1=0
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then
boo1=1
end
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:FilterSelect(tp,cm.rmfilter,1,1,nil):GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsType(TYPE_MONSTER) then
if boo1==1 then
local batk=tc:GetBaseAttack()
local batt=tc:GetOriginalAttribute()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(batt)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(batk)
c:RegisterEffect(e2)
end
end
if boo1==1 and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
if Duel.SendtoDeck(g,tp,2,REASON_EFFECT)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetTargetRange(0,1)
e3:SetTarget(cm.sumlimit)
c:RegisterEffect(e3)
c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
end
end
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:GetAttribute()==e:GetHandler():GetAttribute()
end
\ No newline at end of file
return c:IsLocation(LOCATION_EXTRA) and not c:IsAttribute(e:GetHandler():GetAttribute())
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