Commit b3810254 authored by POLYMER's avatar POLYMER

fix

parent aab06952
--叛逆的魔女 晓美焰 --叛逆的魔女 晓美焰
function c60151016.initial_effect(c) function c60151016.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x5b23),3,3) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x5b23),3,3)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c60151016.linklimit) e1:SetValue(c60151016.linklimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable and destroy --disable and destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
...@@ -38,20 +38,20 @@ function c60151016.initial_effect(c) ...@@ -38,20 +38,20 @@ function c60151016.initial_effect(c)
e5:SetCondition(c60151016.immcon) e5:SetCondition(c60151016.immcon)
e5:SetValue(c60151016.efilter) e5:SetValue(c60151016.efilter)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--effect gain --effect gain
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c60151016.regcon) e4:SetCondition(c60151016.regcon)
e4:SetOperation(c60151016.regop) e4:SetOperation(c60151016.regop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c60151016.linklimit(e,se,sp,st) function c60151016.linklimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK return bit.band(st,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end end
function c60151016.ccfilter2(c) function c60151016.ccfilter2(c)
return c:IsSetCard(0x5b23) and c:IsType(TYPE_XYZ) return c:IsSetCard(0x5b23) and c:IsType(TYPE_XYZ)
end end
function c60151016.condition(e,tp,eg,ep,ev,re,r,rp) function c60151016.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>1 and e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter2,nil)>0 return Duel.GetCurrentChain()>1 and e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter2,nil)>0
...@@ -62,7 +62,7 @@ function c60151016.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c60151016.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
function c60151016.ccfilter3(c) function c60151016.ccfilter3(c)
return c:IsSetCard(0x5b23) and c:IsType(TYPE_LINK) return c:IsSetCard(0x5b23) and c:IsType(TYPE_LINK)
end end
function c60151016.discon(e,tp,eg,ep,ev,re,r,rp) function c60151016.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and tp~=ep return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and tp~=ep
...@@ -76,8 +76,7 @@ function c60151016.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -76,8 +76,7 @@ function c60151016.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c60151016.disop2(e,tp,eg,ep,ev,re,r,rp) function c60151016.disop2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
local tc=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then if tc:IsType(TYPE_SPELL+TYPE_TRAP) then
tc:CancelToGrave() tc:CancelToGrave()
...@@ -86,27 +85,26 @@ function c60151016.disop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,27 +85,26 @@ function c60151016.disop2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c60151016.ccfilter(c) function c60151016.ccfilter(c)
return c:IsSetCard(0x5b23) and c:IsRace(RACE_SPELLCASTER) return c:IsSetCard(0x5b23) and c:IsRace(RACE_SPELLCASTER)
end end
function c60151016.immcon(e,tp,eg,ep,ev,re,r,rp) function c60151016.immcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()<2 and e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter,nil)>0 return Duel.GetCurrentChain()<2 and e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter,nil)>0
end end
function c60151016.efilter(e,te) function c60151016.efilter(e,te)
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:IsHasType(EFFECT_TYPE_ACTIVATE) then return true end return te:GetOwner()~=e:GetOwner()
if te:IsActiveType(TYPE_MONSTER) and te:IsActivated() then return true end
end end
function c60151016.regcon(e,tp,eg,ep,ev,re,r,rp) function c60151016.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c60151016.regop(e,tp,eg,ep,ev,re,r,rp) function c60151016.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter,nil)>0 then if e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter,nil)>0 then
c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60151016,0)) c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60151016,0))
end end
if e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter2,nil)>0 then if e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter2,nil)>0 then
c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60151016,1)) c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60151016,1))
end end
if e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter3,nil)>0 then if e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter3,nil)>0 then
c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60151016,2)) c:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(60151016,2))
end end
end end
\ No newline at end of file
--LUKA Black Jack --LUKA Black Jack
function c60151411.initial_effect(c) function c60151411.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3b28),5,2) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3b28),5,2)
c:EnableReviveLimit() c:EnableReviveLimit()
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c60151411.regop) e1:SetOperation(c60151411.regop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--equip --equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151411,0)) e2:SetDescription(aux.Stringid(60151411,0))
e2:SetCategory(CATEGORY_EQUIP) e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c60151411.eqcon) e2:SetCondition(c60151411.eqcon)
e2:SetCost(c60151411.eqcost) e2:SetCost(c60151411.eqcost)
e2:SetTarget(c60151411.eqtg) e2:SetTarget(c60151411.eqtg)
e2:SetOperation(c60151411.eqop) e2:SetOperation(c60151411.eqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151411,1)) e3:SetDescription(aux.Stringid(60151411,1))
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCost(c60151411.thcost) e3:SetCost(c60151411.thcost)
e3:SetOperation(c60151411.thop) e3:SetOperation(c60151411.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c60151411.regop(e,tp,eg,ep,ev,re,r,rp) function c60151411.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TO_DECK) e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetReset(RESET_EVENT+0x1fc0000+RESET_CHAIN) e1:SetReset(RESET_EVENT+0x1fc0000+RESET_CHAIN)
e1:SetValue(1) e1:SetValue(1)
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
end end
function c60151411.cfilter(c) function c60151411.cfilter(c)
return c:GetFlagEffect(60151411)>0 return c:GetFlagEffect(60151411)>0
end end
function c60151411.eqcon(e,tp,eg,ep,ev,re,r,rp) function c60151411.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return not c:GetEquipGroup():IsExists(c60151411.cfilter,1,nil) return not c:GetEquipGroup():IsExists(c60151411.cfilter,1,nil)
end end
function c60151411.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) function c60151411.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c60151411.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60151411.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function c60151411.eqlimit(e,c) function c60151411.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
end end
function c60151411.eqop(e,tp,eg,ep,ev,re,r,rp) function c60151411.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(60151411,RESET_EVENT+0x1fe0000,0,0) tc:RegisterFlagEffect(60151411,RESET_EVENT+0x1fe0000,0,0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151411.eqlimit) e1:SetValue(c60151411.eqlimit)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
else Duel.SendtoGrave(tc,REASON_EFFECT) end else Duel.SendtoGrave(tc,REASON_EFFECT) end
end end
end end
function c60151411.filter(c) function c60151411.filter(c)
return c:IsSetCard(0x3b28) and c:IsAbleToHand() return c:IsSetCard(0x3b28) and c:IsAbleToHand()
end end
function c60151411.cfilter2(c) function c60151411.cfilter2(c)
return c:GetFlagEffect(60151411)>0 and c:IsAbleToDeckAsCost() return c:GetFlagEffect(60151411)>0 and c:IsAbleToDeckAsCost()
end end
function c60151411.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c60151411.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetEquipGroup():IsExists(c60151411.cfilter2,1,nil) if chk==0 then return c:GetEquipGroup():IsExists(c60151411.cfilter2,1,nil)
and Duel.IsExistingMatchingCard(c60151411.filter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingMatchingCard(c60151411.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=c:GetEquipGroup():FilterSelect(tp,c60151411.cfilter2,1,1,nil) local g=c:GetEquipGroup():FilterSelect(tp,c60151411.cfilter2,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c60151411.thop(e,tp,eg,ep,ev,re,r,rp) function c60151411.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60151411.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c60151411.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
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