Commit 5203036a authored by Huangnan's avatar Huangnan

fix

parent 414cc59b
--LA Da'ath 王冠的梅丹佐
function c1200006.initial_effect(c)
--des
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetDescription(aux.Stringid(1200006,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c1200006.atktg)
e2:SetOperation(c1200006.atkop)
c:RegisterEffect(e2)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetDescription(aux.Stringid(1200006,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(c1200006.target2)
e1:SetOperation(c1200006.operation2)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200006,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1)
e3:SetCondition(c1200006.spcon)
e3:SetTarget(c1200006.sptg)
e3:SetOperation(c1200006.spop)
c:RegisterEffect(e3)
end
function c1200006.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200006.refilter(c)
return c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c1200006.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1200006.refilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c1200006.refilter,tp,LOCATION_DECK,0,1,nil) end
end
function c1200006.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(c1200006.refilter,tp,LOCATION_HAND,0,1,nil) then return false end
if not Duel.IsExistingMatchingCard(c1200006.refilter,tp,LOCATION_DECK,0,1,nil) then return false end
local g1=Duel.SelectMatchingCard(tp,c1200006.refilter,tp,LOCATION_HAND,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c1200006.refilter,tp,LOCATION_DECK,0,1,1,nil)
g1:Merge(g2)
local m=g1:GetCount()
if m>0 then
Duel.SendtoGrave(g1,REASON_RELEASE+REASON_EFFECT)
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c1200006.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=sg:GetNext()
end
end
end
function c1200006.filter2(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack()
end
function c1200006.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c1200006.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1200006.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1200006,2))
local g=Duel.SelectTarget(tp,c1200006.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c1200006.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLocation(LOCATION_HAND) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
end
function c1200006.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousAttackOnField()>c:GetBaseAttack()
end
function c1200006.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xfba) and c:IsType(TYPE_MONSTER)
end
function c1200006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp)
and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1200006.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1200006.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1200006.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--LA Da'ath 智慧的拉結兒
function c1200007.initial_effect(c)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200007,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,1200007)
e2:SetTarget(c1200007.sptg)
e2:SetOperation(c1200007.spop)
c:RegisterEffect(e2)
end
function c1200007.spfilter(c)
return c:IsSetCard(0xfba) and c:IsFaceup() and c:IsAbleToHand()
end
function c1200007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1200007.spfilter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c1200007.spfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c1200007.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1200007.spthfilter(c)
return c:IsSetCard(0xfbc) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c1200007.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SendtoHand(tc,nil,REASON_EFFECT) then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then
if (tc:GetRace()==e:GetHandler():GetRace() or tc:GetAttribute()==e:GetHandler():GetAttribute()) and Duel.IsExistingMatchingCard(c1200007.spthfilter,tp,LOCATION_DECK,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(1200007,1)) then
local g=Duel.SelectMatchingCard(tp,c1200007.spthfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
end
end
end
--LA SY 六耀的霓虹丘兒
function c1200052.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c1200052.sprcon)
e2:SetOperation(c1200052.sprop)
c:RegisterEffect(e2)
--scale
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CHANGE_LSCALE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c1200052.sccon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e4)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200052,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetTarget(c1200052.ptg)
e2:SetOperation(c1200052.pop)
c:RegisterEffect(e2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200052,1))
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCountLimit(1)
e1:SetCondition(c1200052.spcon)
e1:SetTarget(c1200052.sptg)
e1:SetOperation(c1200052.spop)
c:RegisterEffect(e1)
--pendulum
local e4=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200052,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c1200052.pencon)
e4:SetTarget(c1200052.pentg)
e4:SetOperation(c1200052.penop)
c:RegisterEffect(e4)
end
function c1200052.cpfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfba) and c:GetOriginalRace()==RACE_BEASTWARRIOR
end
function c1200052.sccon(e)
return not Duel.IsExistingMatchingCard(c1200052.cpfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
end
function c1200052.sprfilter(c)
return c:IsFaceup() and c:GetLevel()>4 and c:IsReleasable() and c:IsSetCard(0xfba)
end
function c1200052.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel()
return c:IsType(TYPE_TUNER) and g:IsExists(c1200052.sprfilter2,1,c,tp,c,sc,lv)
end
function c1200052.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc)
return c:GetLevel()==lv and c:IsSetCard(0xfba) and not c:IsType(TYPE_TUNER)
and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end
function c1200052.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c1200052.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c1200052.sprfilter1,1,nil,tp,g,c)
end
function c1200052.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c1200052.sprfilter,tp,LOCATION_MZONE,0,nil)
local g1=g:FilterSelect(tp,c1200052.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
local g2=g:FilterSelect(tp,c1200052.sprfilter2,1,1,mc,tp,mc,c,mc:GetLevel())
g1:Merge(g2)
Duel.Release(g1,REASON_COST)
end
function c1200052.pfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xfba) and c:IsAbleToHand()
end
function c1200052.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200052.pfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c1200052.pop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200052.pfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c1200052.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0xfbc)
end
function c1200052.filter(c,e,tp)
return c:IsSetCard(0xfba) and (c:GetLevel()==8 or c:GetLevel()==7) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP)
end
function c1200052.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFaceup() and c:IsRelateToEffect(e) and not c:IsStatus(STATUS_CHAINING)
and Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c1200052.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1200052.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1200052.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c1200052.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c1200052.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c1200052.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
\ No newline at end of file
--Darkest 赏金猎人
function c22230004.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22230004,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(c22230004.postg)
e1:SetOperation(c22230004.posop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e2:SetOperation(c22230004.flipop)
c:RegisterEffect(e2)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22230004,2))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,22230004)
e1:SetTarget(c22230004.sptg)
e1:SetOperation(c22230004.spop)
c:RegisterEffect(e1)
end
c22230004.named_with_Darkest_D=1
function c22230004.IsDarkest(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Darkest_D
end
function c22230004.filter(c)
return c:IsFaceup() and c:IsCanTurnSet() and not (c:IsLocation(LOCATION_PZONE) and c:IsType(TYPE_PENDULUM))
end
function c22230004.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c22230004.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22230004.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c22230004.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if e:GetHandler():GetFlagEffect(22230004)~=0 then
e:SetLabel(1)
e:GetHandler():ResetFlagEffect(22230004)
else
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c22230004.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_SZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN)
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
if e:GetLabel()==1 and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(22230004,1)) then
local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if dg then Duel.Destroy(dg,REASON_EFFECT) end
end
end
function c22230004.flipop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(22230004,0,0,0)
end
function c22230004.spfilter(c)
return c:IsFaceup() and c:IsCanTurnSet() and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_FLIP) and c22230004.IsDarkest(c)
end
function c22230004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22230004.spfilter(chkc) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingTarget(c22230004.spfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c22230004.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22230004.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
if Duel.ChangePosition(tc,POS_FACEDOWN)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
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