Commit 52aa19a5 authored by mercury233's avatar mercury233

fix

parent 9c8c765d
......@@ -22,7 +22,7 @@ function c100200201.initial_effect(c)
c:RegisterEffect(e2)
end
function c100200201.cfilter(c)
return c:IsSetCard(0x48) and not c:IsPublic()
return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and not c:IsPublic()
end
function c100200201.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200201.cfilter,tp,LOCATION_EXTRA,0,1,nil) end
......@@ -54,7 +54,7 @@ function c100200201.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetRange(LOCATION_MZONE)
e2:SetAbsoluteRange(tp,1,0)
e2:SetTarget(c100200201.splimit)
e2:SetReset(RESET_PHASE+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
......
......@@ -39,7 +39,7 @@ function c100278002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100278002.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......
......@@ -37,18 +37,18 @@ function c100278003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c100278003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_DECK)
end
function c100278003.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4) and not c:IsCode(100278003) and c:IsAbleToHand()
end
function c100278003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100278003.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c100278003.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
......@@ -72,7 +72,6 @@ function c100278003.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-1500)
tc:RegisterEffect(e1)
......
......@@ -74,7 +74,7 @@ function c100278004.thfilter(c)
return c:IsCode(16404809) and c:IsAbleToHand()
end
function c100278004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278004.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c100278004.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end
......@@ -84,7 +84,7 @@ end
function c100278004.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100278004.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,tp,REASON_EFFECT)>0 then
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(c100278004.sumfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100278004,2)) then
......
......@@ -16,7 +16,7 @@ function c100278006.initial_effect(c)
end
c100278006.spchecks=aux.CreateChecks(Card.IsCode,{100278001,100278002,100278003,100278004,40640057})
function c100278006.cfilter(c,tp)
return c:IsFaceup() and c:IsLevel(5) and Duel.GetMZoneCount(tp,c)>=5
return c:IsFaceup() and c:IsLevel(5) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>=5
end
function c100278006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
......
......@@ -6,7 +6,7 @@ function c100278007.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278007,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100278007+EFFECT_COUNT_CODE_DUEL)
......@@ -29,7 +29,7 @@ function c100278007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
......
......@@ -28,6 +28,11 @@ function c100278010.costfilter(c,e,tp)
return c:IsSetCard(0xc008) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c100278010.thfilter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
function c100278010.thfilter(c,e,tp)
if not (c:IsSetCard(0xc008) and c:IsType(TYPE_MONSTER)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c100278010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.IsExistingMatchingCard(c100278010.costfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......@@ -35,11 +40,6 @@ function c100278010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c100278010.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100278010.thfilter(c,e,tp)
if not (c:IsSetCard(0xc008) and c:IsType(TYPE_MONSTER)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c100278010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local res=e:GetLabel()==1
......
......@@ -64,6 +64,7 @@ function c100278011.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(c100278011.efilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--act limit
local e2=Effect.CreateEffect(c)
......@@ -71,11 +72,13 @@ function c100278011.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c100278011.limcon)
e2:SetOperation(c100278011.limop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_END)
e3:SetOperation(c100278011.limop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,100278011,RESET_PHASE+PHASE_END,0,1)
end
......
......@@ -6,7 +6,7 @@ function c100278017.initial_effect(c)
e1:SetDescription(aux.Stringid(100278017,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100278017)
e1:SetCost(c100278017.drcost)
......
......@@ -21,7 +21,7 @@ function c100278020.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,100278020+100)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100278020.negcon)
e2:SetTarget(c100278020.negtg)
......@@ -30,17 +30,18 @@ function c100278020.initial_effect(c)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278020,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,100278020+100)
e3:SetCondition(c100278020.descon)
e3:SetTarget(c100278020.destg)
e3:SetOperation(c100278020.desop)
c:RegisterEffect(e3)
end
function c100278020.matfilter1(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR)
return c:IsFusionAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR)
end
function c100278020.matfilter2(c)
return c:IsRace(RACE_BEAST)
......@@ -49,7 +50,8 @@ function c100278020.spfilter(c,e,tp)
return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100278020.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100278020.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100278020.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -26,7 +26,6 @@ function c100278021.initial_effect(c)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100278021,1))
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetOperation(c100278021.desop)
......@@ -76,6 +75,6 @@ function c100278021.tkop(e,tp,eg,ep,ev,re,r,rp)
end
function c100278021.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,0,nil,100278121)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0,nil,100278121)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -62,6 +62,7 @@ function c100278022.descon(e,tp,eg,ep,ev,re,r,rp)
if not tc then return false end
e:SetLabelObject(tc)
return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:GetAttack()<Duel.GetLP(tp)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,62499965)
end
function c100278022.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
......
......@@ -21,9 +21,9 @@ end
function c100278024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100278024.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100278024.filter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
and Duel.IsExistingTarget(c100278024.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100278024.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp)
local g=Duel.SelectTarget(tp,c100278024.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100278024.activate(e,tp,eg,ep,ev,re,r,rp)
......@@ -40,11 +40,15 @@ function c100278024.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetCondition(c100278024.splimitcon)
e1:SetTarget(c100278024.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1,true)
end
end
function c100278024.splimitcon(e)
return e:GetHandler():IsControler(e:GetOwnerPlayer())
end
function c100278024.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
--ZW-天風精靈
--ZW-天風精霊
--Script by XyLeN
function c100278025.initial_effect(c)
c:SetUniqueOnField(1,0,100278025)
......@@ -18,6 +18,7 @@ function c100278025.initial_effect(c)
e2:SetDescription(aux.Stringid(100278025,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
......@@ -80,24 +81,25 @@ function c100278025.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c100278025.cfilter(c,tp)
return c:IsSummonPlayer(1-tp) and Duel.GetCurrentChain()>0
return c:IsSummonPlayer(1-tp)
end
function c100278025.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c100278025.cfilter,1,nil,tp)
return re and re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer() and eg:IsExists(c100278025.cfilter,1,nil,tp)
end
function c100278025.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
ec:RegisterEffect(e1)
end
function c100278025.repcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and re:GetHandler():GetOverlayCount()>=ev-1
and e:GetHandler():GetEquipTarget()==re:GetHandler() and e:GetHandler():IsAbleToGraveAsCost() and ep==e:GetOwnerPlayer()
end
function c100278025.repop(e,tp,eg,ep,ev,re,r,rp)
return Duel.SendtoGrave(e:GetHandler(),POS_FACEUP,REASON_COST)
return Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
......@@ -6,7 +6,6 @@ function c100278026.initial_effect(c)
e1:SetDescription(aux.Stringid(100278026,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c100278026.sptg)
e1:SetOperation(c100278026.spop)
......@@ -26,12 +25,12 @@ function c100278026.spfilter(c,e,tp)
return not c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278026.eqfilter(c)
return c:IsSetCard(0x107f) and c:IsType(TYPE_MONSTER)
return c:IsSetCard(0x107f) and c:IsFaceup()
end
function c100278026.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>1
and Duel.IsExistingMatchingCard(c100278026.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100278026.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_MZONE)
......@@ -52,8 +51,7 @@ function c100278026.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,c100278026.eqfilter,tp,LOCATION_MZONE,0,1,1,tc)
local ec=sg:GetFirst()
......@@ -122,6 +120,7 @@ end
function c100278026.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if tc:IsImmuneToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
......@@ -37,7 +37,7 @@ function c100278027.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100278027.eqfilter(c,tp)
return c:IsSetCard(0x107e) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
return c:IsSetCard(0x107e) and c:IsType(TYPE_MONSTER) and c.zw_equip_monster and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function c100278027.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......@@ -51,9 +51,7 @@ function c100278027.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c100278027.eqfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if not tc then return end
local mt=_G["c"..tc:GetCode()]
mt.zw_equip_monster(tc,tp,c)
tc.zw_equip_monster(tc,tp,c)
end
end
function c100278027.cfilter(c)
......@@ -62,7 +60,7 @@ end
function c100278027.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetEquipGroup()
return #g>0 and g:IsExists(c100278027.cfilter,1,nil)
return g:IsExists(c100278027.cfilter,1,nil)
end
function c100278027.disfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
......@@ -70,14 +68,14 @@ end
function c100278027.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c100278027.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100278027.disfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,c100278027.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c100278027.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() and tc:IsControler(1-tp) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
......
......@@ -53,7 +53,6 @@ function c100278028.activate(e,tp,eg,ep,ev,re,r,rp)
while lc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
......
......@@ -62,8 +62,10 @@ function c100278030.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100278030.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,c100278030.desfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
local g=Duel.SelectMatchingCard(tp,c100278030.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
Duel.HintSelection(g)
local dam=math.floor(tc:GetAttack()/2)
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,dam,REASON_EFFECT)
......
......@@ -31,6 +31,7 @@ function c100278031.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c100278031.spcon)
e3:SetTarget(c100278031.sptg)
e3:SetOperation(c100278031.spop)
......@@ -57,8 +58,10 @@ function c100278031.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100278031.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,c100278031.desfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
local g=Duel.SelectMatchingCard(tp,c100278031.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
Duel.Destroy(tc,REASON_EFFECT)
end
end
......
......@@ -120,7 +120,7 @@ function c100278033.matop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g2=Duel.SelectMatchingCard(tp,c100278033.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g2:GetFirst()
if tc and Duel.Overlay(tc,g1)~=0 then
if tc and not tc:IsImmuneToEffect(e) and Duel.Overlay(tc,g1)~=0 then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
......
......@@ -125,9 +125,9 @@ function c100278034.copyop(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(-500)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=e3:Clone()
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e4)
tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DISABLE)
......@@ -162,7 +162,7 @@ function c100278034.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 c100278034.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 false end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
......
......@@ -14,14 +14,14 @@ function c100278035.initial_effect(c)
c:RegisterEffect(e1)
end
function c100278035.costfilter(c)
return c:IsSetCard(0x2016) and c:IsAbleToGraveAsCost()
return c:IsSetCard(0x2016) and c:IsAbleToGraveAsCost()
end
function c100278035.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278035.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c100278035.costfilter,1,1,REASON_COST)
end
function c100278035.filter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100278035.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278035.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -13,7 +13,7 @@ function c100278036.initial_effect(c)
c:RegisterEffect(e1)
end
function c100278036.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf7)
return c:IsFaceup() and c:IsSetCard(0xf7)
end
function c100278036.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100278036.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -9,6 +9,7 @@ function c100278038.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100278038)
e1:SetCondition(c100278038.spcon)
e1:SetTarget(c100278038.sptg)
......@@ -36,7 +37,7 @@ function c100278038.initial_effect(c)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,100278138)
e4:SetCondition(c100278038.thcon)
e4:SetCost(c100278038.thcost)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c100278038.thtg)
e4:SetOperation(c100278038.thop)
c:RegisterEffect(e4)
......@@ -87,11 +88,6 @@ function c100278038.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c100278038.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() and c:IsLocation(LOCATION_GRAVE) end
Duel.Remove(c,POS_FACEUP,REASON_COST)
end
function c100278038.thfilter(c)
return c:IsSetCard(0xe5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -29,14 +29,14 @@ function c100278040.initial_effect(c)
e3:SetOperation(c100278040.nameop)
c:RegisterEffect(e3)
end
function c100278040.lvfilter(c)
return c:IsFaceup() and c:IsLevelBelow(6)
function c100278040.lvfilter(c,e)
return c:IsFaceup() and c:IsLevelBelow(6) and c:IsCanBeEffectTarget(e)
end
function c100278040.fselect(g)
return g:GetClassCount(Card.GetCode)==1
end
function c100278040.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c100278040.lvfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c100278040.lvfilter,tp,LOCATION_MZONE,0,nil,e)
if chkc then return false end
if chk==0 then return g:CheckSubGroup(c100278040.fselect,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......@@ -52,7 +52,6 @@ function c100278040.lvop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
......
......@@ -9,6 +9,7 @@ function c100278044.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,100278044)
e1:SetTarget(c100278044.target)
e1:SetOperation(c100278044.activate)
c:RegisterEffect(e1)
......@@ -18,7 +19,7 @@ function c100278044.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100278044)
e2:SetCountLimit(1,100278044+100)
e2:SetCondition(aux.exccon)
e2:SetCost(c100278044.thcost)
e2:SetTarget(c100278044.thtg)
......
......@@ -8,7 +8,7 @@ function c101106021.initial_effect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c101106021.matlimit)
c:RegisterEffect(e0)
local e1=e0:Clone()
local e1=e0:Clone()
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e1)
--extra summon
......@@ -38,7 +38,7 @@ function c101106021.matlimit(e,c)
return not c:IsSetCard(0x165)
end
function c101106021.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x165)
return c:IsFaceup() and c:IsSetCard(0x165)
end
function c101106021.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101106021.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -49,7 +49,7 @@ function c101106023.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c101106023.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101106023.filter(c)
function c101106023.filter(c)
return c:IsCode(24639891) and c:IsAbleToDeck()
end
function c101106023.spop2(e,tp,eg,ep,ev,re,r,rp)
......@@ -62,7 +62,7 @@ function c101106023.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=sg:Select(tp,1,#sg,nil)
Duel.BreakEffect()
local tc=dg:GetFirst()
local tc=dg:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
......
......@@ -29,7 +29,7 @@ function c101106047.initial_effect(c)
c:RegisterEffect(e4)
end
function c101106047.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c101106047.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -50,7 +50,7 @@ function c101106047.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c101106047.attrchkfilter(c,attr)
function c101106047.attrchkfilter(c,attr)
return c:IsAttribute(attr) and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0x165))
end
function c101106047.rmcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -19,7 +19,7 @@ function c101106075.cfilter2(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c101106075.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
return tp~=ep and Duel.GetCurrentChain()==0
and Duel.IsExistingMatchingCard(c101106075.cfilter1,tp,LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(c101106075.cfilter2,tp,LOCATION_MZONE,0,1,nil)
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