Commit 60444c5d authored by mercury233's avatar mercury233

fix

parent c9a2bae4
......@@ -59,16 +59,19 @@ end
function c10796448.costfilter(c)
return c:IsReleasable() and ((c:IsFacedown() and c:IsDefensePos()) or (c:IsFaceup() and c:IsAttackPos()))
end
function c10796448.spcheck(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and aux.gfcheck(g,Card.IsPosition,POS_FACEUP_ATTACK,POS_FACEDOWN_DEFENSE)
end
function c10796448.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c10796448.costfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsPosition,POS_FACEUP_ATTACK,POS_FACEDOWN_DEFENSE) end
if chk==0 then return g:CheckSubGroup(c10796448.spcheck,2,2,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsPosition,POS_FACEUP_ATTACK,POS_FACEDOWN_DEFENSE)
local sg=g:SelectSubGroup(tp,c10796448.spcheck,false,2,2,tp)
Duel.Release(sg,REASON_COST)
end
function c10796448.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c10796448.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,8 +41,8 @@ function s.initial_effect(c)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.ffilter1(c)
return c:IsFusionCode(23995346)
function s.ffilter1(c,fc)
return c:IsFusionCode(23995346) or c:CheckFusionSubstitute(fc)
end
function s.ffilter2(c)
return c:IsFusionSetCard(0xdd) and c:IsType(TYPE_MONSTER)
......@@ -51,7 +51,7 @@ function s.ffilter3(c)
return c:IsFusionSetCard(0xcf) and c:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL)
end
function s.ffilter(c,fc)
return c:IsCanBeFusionMaterial(fc) and (s.ffilter1(c) or s.ffilter2(c) or s.ffilter3(c))
return c:IsCanBeFusionMaterial(fc) and (s.ffilter1(c,fc) or s.ffilter2(c) or s.ffilter3(c))
end
function s.f2filter3(c,sg)
return s.ffilter3(c) and sg:IsExists(s.ffilter2,3,c)
......@@ -66,7 +66,7 @@ function s.fcheck(sg,fc,tp,gc,chkf)
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc)
or aux.FGoalCheckAdditional and not aux.FGoalCheckAdditional(tp,sg,fc) then return false end
if ct==2 then
return aux.gffcheck(sg,s.ffilter1,nil,s.ffilter3,nil)
return aux.gffcheck(sg,s.ffilter1,fc,s.ffilter3,nil)
else
return sg:IsExists(s.f2filter3,1,nil,sg)
end
......@@ -87,7 +87,7 @@ function s.foperation(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
Duel.SetFusionMaterial(g)
end
function s.ultimate_fusion_check(tp,sg,fc)
return #sg==2 and aux.gffcheck(sg,s.ffilter1,nil,s.ffilter3,nil)
return #sg==2 and aux.gffcheck(sg,s.ffilter1,fc,s.ffilter3,nil)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
......@@ -140,9 +140,8 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function s.spfilter(c,e,tp)
return (c:IsFusionSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and not (c:IsCode(70551291) or c:IsCode(55410871) or c:IsCode(20654247)))
return (c:IsSetCard(0xdd) or c:IsSetCard(0xcf) and c:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
......@@ -154,6 +153,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -2,6 +2,7 @@
function c1269512.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,3,c1269512.ovfilter,aux.Stringid(1269512,0),3,c1269512.xyzop)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
......@@ -9,6 +10,7 @@ function c1269512.initial_effect(c)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1269512,2))
e2:SetCategory(CATEGORY_DISABLE)
......@@ -19,6 +21,7 @@ function c1269512.initial_effect(c)
e2:SetTarget(c1269512.distg)
e2:SetOperation(c1269512.disop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1269512,3))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
......
......@@ -8,7 +8,7 @@ function s.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
......@@ -34,12 +34,12 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.nefilter(c)
return c:IsFaceup() and c:IsAttackAbove(2500)
return aux.NegateMonsterFilter(c) and c:IsAttackAbove(2500)
end
function s.netg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.nefilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.nefilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,s.nefilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
......
--獣累々
function c19974890.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......
......@@ -23,7 +23,7 @@ function s.initial_effect(c)
--Disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
......@@ -61,6 +61,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.BreakEffect()
Duel.Destroy(sg,REASON_EFFECT)
end
......
......@@ -17,25 +17,24 @@ function c42427230.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,42427231)
e2:SetTarget(c42427230.destg)
e2:SetOperation(c42427230.desop)
c:RegisterEffect(e2)
end
function c42427230.cfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup()) and c:IsCode(42427230) and c:IsReleasable()
return (c:IsControler(tp) or c:IsFaceup()) and c:IsCode(42427230)
end
function c42427230.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local rg=Duel.GetMatchingGroup(c42427230.cfilter,tp,LOCATION_MZONE,0,nil,tp)
if chk==0 then return rg:GetCount()==Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,42427230):GetCount() and rg:GetCount()~=0 and Duel.GetMZoneCount(tp,rg)>0 end
if chk==0 then return rg:GetCount()==rg:FilterCount(Card.IsReleasable,nil)
and rg:GetCount()~=0 and Duel.GetMZoneCount(tp,rg)>0 end
local ct=Duel.Release(rg,REASON_COST)*2
e:SetLabel(ct)
end
function c42427230.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,42427231,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_FIRE) end
local ct=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
......@@ -74,9 +73,9 @@ function c42427230.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c42427230.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetLabel()
local p=e:GetLabel()
if c:IsReason(REASON_DESTROY) then
Duel.Damage(1-tp,500,REASON_EFFECT)
Duel.Damage(1-p,500,REASON_EFFECT)
end
e:Reset()
end
......@@ -88,7 +87,7 @@ function c42427230.desfilter2(c,e)
end
function c42427230.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c42427230.desfilter(chkc) end
local g=Duel.GetMatchingGroup(c42427230.desfilter2,tp,LOCATION_MZONE,0,nil,e)
local g=Duel.GetMatchingGroup(c42427230.desfilter2,tp,LOCATION_ONFIELD,0,nil,e)
if chk==0 then return g:GetCount()~=0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,g:GetCount(),nil)
......
......@@ -7,7 +7,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+id)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
......@@ -42,40 +42,35 @@ function s.initial_effect(c)
e4:SetOperation(s.pzop)
c:RegisterEffect(e4)
end
function s.cfilter(c,tp,chk)
function s.cfilter(c,tp,tgchk)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)>0
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and (c:IsReason(REASON_BATTLE)
or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
and (not chk or Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,c))
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
and (tgchk or Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,c:GetOriginalRace()))
end
function s.chk(c,tc)
return c:GetOriginalRace()==tc:GetOriginalRace()
end
function s.filter(c,r)
if not c:IsType(TYPE_PENDULUM) then return false end
local t=type(r)
if t=='userdata' then
local v=aux.GetValueType(r)
if v=='Card' then return s.chk(c,r)
elseif v=='Group' then return r:IsExists(s.chk,1,c,c)
else return false end
elseif t=='number' then return c:GetOriginalRace()==r
else return false end
function s.filter(c,race)
return c:IsType(TYPE_PENDULUM) and (c:GetOriginalRace()&race)>0
end
function s.txcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
return eg:IsExists(s.cfilter,1,nil,tp,false)
end
function s.txtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(s.cfilter,nil,tp,chk==0)
if chk==0 then return #g>0 end
Duel.SetTargetCard(g)
if chk==0 then return true end
local g=eg:Filter(s.cfilter,nil,tp,true)
local race=0
for tc in aux.Next(g) do
race=race|tc:GetOriginalRace()
end
e:SetLabel(race)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end
function s.txop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
local race=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local tg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,g)
local tg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,race)
if #tg>0 then
Duel.SendtoExtraP(tg,nil,REASON_EFFECT)
end
end
function s.sfilter(c)
return c:IsLevelBelow(4) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
......@@ -96,6 +91,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if #g<2 or Duel.Destroy(g,REASON_EFFECT)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil)
if #sg==0 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
......
--ミラァと燐寸之仔
function c44201739.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(44201739,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -9,6 +10,7 @@ function c44201739.initial_effect(c)
e1:SetTarget(c44201739.sptg)
e1:SetOperation(c44201739.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(44201739,1))
e2:SetCategory(CATEGORY_NEGATE)
......@@ -39,9 +41,10 @@ function c44201739.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
Duel.ShuffleDeck(tp)
end
end
function c44201739.negcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -62,7 +65,7 @@ end
function c44201739.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c44201739.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,re)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.NegateActivation(ev)
end
end
......@@ -38,14 +38,14 @@ function s.initial_effect(c)
c:RegisterEffect(e4)
end
s.lvup={id}
function s.spfilter(c)
return (c:IsCode(57116033) or c:IsSetCard(0x3008) and c:IsType(TYPE_FUSION)) and c:IsFaceupEx() and c:IsAbleToRemoveAsCost()
function s.spfilter(c,tp)
return (c:IsCode(57116033) or c:IsSetCard(0x3008) and c:IsType(TYPE_FUSION))
and c:IsFaceupEx() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_HAND,0,1,c)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_HAND,0,1,c,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......@@ -63,12 +63,14 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return tc:IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
if math.max(0,tc:GetTextAttack())>0 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) end
if tc:GetTextAttack()>0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,tc:GetTextAttack())
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() and tc:IsLocation(LOCATION_MZONE) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Damage(1-tp,math.max(0,tc:GetTextAttack()),REASON_EFFECT)
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)>0 and tc:GetTextAttack()>0 then
Duel.Damage(1-tp,tc:GetTextAttack(),REASON_EFFECT)
end
end
function s.descon2(e,tp,eg,ep,ev,re,r,rp)
......@@ -82,7 +84,8 @@ function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if tc:IsRelateToEffect(re) and tc:IsLocation(LOCATION_MZONE) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Damage(1-tp,math.max(0,tc:GetTextAttack()),REASON_EFFECT)
if tc:IsRelateToEffect(re) and tc:IsLocation(LOCATION_MZONE)
and Duel.Destroy(tc,REASON_EFFECT)>0 and tc:GetTextAttack()>0 then
Duel.Damage(1-tp,tc:GetTextAttack(),REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -5,6 +5,7 @@ function c48654267.initial_effect(c)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c48654267.matfilter),1)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(48654267,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -15,6 +16,7 @@ function c48654267.initial_effect(c)
e1:SetTarget(c48654267.psptg)
e1:SetOperation(c48654267.pspop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(48654267,1))
e2:SetCategory(CATEGORY_POSITION)
......@@ -30,6 +32,7 @@ function c48654267.initial_effect(c)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCondition(c48654267.spcon2)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(48654267,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
......@@ -49,6 +52,7 @@ function c48654267.cfilter(c,tp)
end
function c48654267.pspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c48654267.cfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c48654267.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
......
......@@ -15,13 +15,13 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.filter(c,lg)
return c:IsFaceup() and lg:IsContains(c) and c:IsCanBeEffectTarget()
return c:IsFaceup() and lg:IsContains(c)
end
function s.lmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,lg) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,lg)
end
function s.lmop(e,tp,eg,ep,ev,re,r,rp)
......
--コード・オブ・ソウル
function c74652966.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74652966,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -10,6 +11,7 @@ function c74652966.initial_effect(c)
e1:SetTarget(c74652966.sptg)
e1:SetOperation(c74652966.spop)
c:RegisterEffect(e1)
--link summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74652966,1))
e2:SetType(EFFECT_TYPE_IGNITION)
......@@ -17,6 +19,7 @@ function c74652966.initial_effect(c)
e2:SetCountLimit(1,44201739+1)
e2:SetOperation(c74652966.efop)
c:RegisterEffect(e2)
--link summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(74652966,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -24,7 +27,8 @@ function c74652966.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,44201739+300)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCountLimit(1,44201739+2)
e3:SetCondition(c74652966.lkcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c74652966.lktg)
......
......@@ -29,16 +29,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function s.spfilter(c,tuner)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsSynchroSummonable(tuner)
......@@ -46,7 +48,10 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local comp=false
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......@@ -59,6 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
comp=true
Duel.AdjustAll()
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup()
......@@ -69,6 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
if not comp then Duel.SpecialSummonComplete() end
end
function s.indcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsRace(RACE_DRAGON)
......
--ライフハック
function c83589191.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(83589191,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
......@@ -12,6 +13,7 @@ function c83589191.initial_effect(c)
e1:SetTarget(c83589191.target)
e1:SetOperation(c83589191.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(83589191,1))
e2:SetCategory(CATEGORY_TOHAND)
......
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