Commit 6dc48d0b authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #6 from Sonic714/master

5.9 yume update(effect adjustments and more)
parents 1bcd3d26 44eb1a26
No preview for this file type
expansions/pics/71400022.jpg

45.8 KB | W: | H:

expansions/pics/71400022.jpg

179 KB | W: | H:

expansions/pics/71400022.jpg
expansions/pics/71400022.jpg
expansions/pics/71400022.jpg
expansions/pics/71400022.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400025.jpg

45.3 KB | W: | H:

expansions/pics/71400025.jpg

188 KB | W: | H:

expansions/pics/71400025.jpg
expansions/pics/71400025.jpg
expansions/pics/71400025.jpg
expansions/pics/71400025.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400028.jpg

52.2 KB | W: | H:

expansions/pics/71400028.jpg

210 KB | W: | H:

expansions/pics/71400028.jpg
expansions/pics/71400028.jpg
expansions/pics/71400028.jpg
expansions/pics/71400028.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400030.jpg

51.8 KB | W: | H:

expansions/pics/71400030.jpg

206 KB | W: | H:

expansions/pics/71400030.jpg
expansions/pics/71400030.jpg
expansions/pics/71400030.jpg
expansions/pics/71400030.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400040.jpg

47.6 KB | W: | H:

expansions/pics/71400040.jpg

184 KB | W: | H:

expansions/pics/71400040.jpg
expansions/pics/71400040.jpg
expansions/pics/71400040.jpg
expansions/pics/71400040.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400049.jpg

47.3 KB | W: | H:

expansions/pics/71400049.jpg

234 KB | W: | H:

expansions/pics/71400049.jpg
expansions/pics/71400049.jpg
expansions/pics/71400049.jpg
expansions/pics/71400049.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -32,7 +32,7 @@ function c71400001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,500)
end
function c71400001.activate1(e,tp,eg,ep,ev,re,r,rp)
yume.FieldActivation(tp,nil,1)
yume.ActivateYumeField(tp,nil,1)
end
function c71400001.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -87,7 +87,7 @@ function yume.GetValueType(v)
else return t end
end
function yume.YumeCheckFilter(c)
return c:IsFaceup() and c:IsSetCard(0x3714)
return c:IsFaceup() and c:IsSetCard(0x3714) and c:IsType(TYPE_FIELD)
end
function yume.IsYumeFieldOnField(tp)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
......@@ -140,7 +140,7 @@ function yume.AddYumeFieldGlobal(c,id,ft)
eac:SetCode(EVENT_FREE_CHAIN)
eac:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(eac)
--[[--old self limitation
--[[--old self to deck
local esl=Effect.CreateEffect(c)
esl:SetDescription(aux.Stringid(71400001,1))
esl:SetType(EFFECT_TYPE_QUICK_F)
......@@ -161,6 +161,7 @@ function yume.AddYumeFieldGlobal(c,id,ft)
local esd2=Effect.CreateEffect(c)
esd2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
esd2:SetCode(EVENT_CHAIN_SOLVED)
esd2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
esd2:SetRange(LOCATION_FZONE)
esd2:SetOperation(yume.SelfToDeckOp)
c:RegisterEffect(esd2)
......@@ -214,11 +215,11 @@ function yume.YumeFieldLimitOp(e,tp,eg,ep,ev,re,r,rp)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetValue(yume.YumeFieldActivationLimit)
e4:SetValue(yume.YumeActivateYumeFieldLimit)
e4:SetTargetRange(1,0)
Duel.RegisterEffect(e4,tp)
end
function yume.YumeFieldActivationLimit(e,re,tp)
function yume.YumeActivateYumeFieldLimit(e,re,tp)
local c=re:GetHandler()
return c:IsSetCard(0x714)
end
......@@ -242,12 +243,17 @@ function yume.YumeFieldCheckTarget(id,ft,loc)
if chk==0 then return yume.YumeFieldCheck(tp,id,ft,loc) end
end
end
function yume.FieldActivation(tp,id,ft,loc)
function yume.ActivateYumeField(tp,id,ft,loc)
ft=ft or 0
id=id or 0
loc=loc or LOCATION_DECK
local tc
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400001,3))
local tc=Duel.SelectMatchingCard(tp,yume.ActivateFieldFilter,tp,loc,0,1,1,nil,tp,id,ft):GetFirst()
if loc&LOCATION_GRAVE~=0 and loc~=LOCATION_GRAVE then
tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(yume.ActivateFieldFilter),tp,loc,0,1,1,nil,tp,id,ft):GetFirst()
else
tc=Duel.SelectMatchingCard(tp,yume.ActivateFieldFilter,tp,loc,0,1,1,nil,tp,id,ft):GetFirst()
end
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
......@@ -263,6 +269,7 @@ function yume.FieldActivation(tp,id,ft,loc)
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
return tc
end
return nil
end
function yume.ActivateFieldFilter(c,tp,id,ft)
local flag=c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) and not c:IsCode(id)
......@@ -280,7 +287,7 @@ function yume.ActivateFieldOp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local id=yume.temp_card_field[c].id
local ft=yume.temp_card_field[c].ft
yume.FieldActivation(tp,id,ft,LOCATION_DECK+LOCATION_HAND)
yume.ActivateYumeField(tp,id,ft,LOCATION_DECK+LOCATION_HAND)
end
--uniquify the same name
function yume.UniquifyCardName(g)
......
......@@ -6,7 +6,7 @@ function c71400010.initial_effect(c)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--get all
--control
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(71400010,0))
......@@ -17,7 +17,7 @@ function c71400010.initial_effect(c)
e1:SetTarget(c71400010.target1)
e1:SetOperation(c71400010.operation1)
c:RegisterEffect(e1)
--lose one
--control
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetDescription(aux.Stringid(71400010,1))
......
......@@ -121,7 +121,7 @@ function c71400011.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and bit.band(c:GetOriginalType(),0x802040)~=0 and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400011.filter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71400011.filter3),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -48,7 +48,7 @@ function c71400013.filter2(c)
end
function c71400013.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=yume.FieldActivation(tp,nil,1)
local tc=yume.ActivateYumeField(tp,nil,1)
local dg=Duel.GetMatchingGroup(c71400013.filter1a,tp,0,LOCATION_ONFIELD,nil)
if tc and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400013,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
......@@ -28,7 +28,7 @@ function c71400014.initial_effect(c)
e3:SetTarget(c71400014.target3)
e3:SetOperation(c71400014.operation3)
c:RegisterEffect(e3)
--self limitation & field activation
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400014,1)
end
function c71400014.operation2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -24,7 +24,7 @@ function c71400015.initial_effect(c)
e2:SetTarget(c71400015.target2)
e2:SetOperation(c71400015.operation2)
c:RegisterEffect(e2)
--self limitation & field activation
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400015,1)
end
function c71400015.filter1(c)
......@@ -45,14 +45,14 @@ function c71400015.operation1(e,tp,eg,ep,ev,re,r,rp)
end
end
function c71400015.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local mcount=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
local mcount=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
if chk==0 then return mcount>0 end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,mcount*500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,mcount*300)
end
function c71400015.operation2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local mcount=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
local mcount=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
if mcount>0 then
local val=Duel.Recover(tp,mcount*500,REASON_EFFECT)
local val=Duel.Recover(tp,mcount*300,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -3,52 +3,102 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400016.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--to hand
--summon
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400016,1)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400016,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c71400016.target)
e1:SetOperation(c71400016.operation)
e1:SetTarget(c71400016.tg1)
e1:SetOperation(c71400016.op1)
c:RegisterEffect(e1)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400016,1)
--draw
--discard deck
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_DRAW)
e2:SetDescription(aux.Stringid(71400016,1))
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(c71400016.con2)
e2:SetTarget(c71400016.tg2)
e2:SetOperation(c71400016.op2)
c:RegisterEffect(e2)
end
function c71400016.filter(c)
return c:IsSetCard(0x714) and c:IsAbleToHand()
function c71400016.filter1(c)
return c:IsSetCard(0x714) and c:IsSummonable(true,nil)
end
function c71400016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400016.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400016.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c71400016.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local mg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,mg,1,tp,LOCATION_ONFIELD)
function c71400016.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400016.filter1,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c71400016.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,c)
if g:GetCount()>0 and tc:IsRelateToEffect(e) and Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c71400016.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
function c71400016.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c71400016.filter1,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
c=e:GetHandler()
Duel.Summon(tp,tc,true,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_COST)
e1:SetOperation(c71400016.regop)
c:RegisterEffect(e1)
end
end
function c71400016.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
function c71400016.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetDescription(aux.Stringid(71400016,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(aux.imval1)
e1:SetReset(RESET_EVENT+0xff0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetLabelObject(tc)
e2:SetCondition(c71400016.reccon)
e2:SetOperation(c71400016.recop)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DESTROY)
e3:SetLabelObject(e2)
e3:SetOperation(c71400016.checkop)
e3:SetReset(RESET_EVENT+0xff0000)
tc:RegisterEffect(e3)
e:Reset()
end
function c71400016.checkop(e,tp,eg,ep,ev,re,r,rp)
local e2=e:GetLabelObject()
e2:SetLabel(1)
end
function c71400016.reccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()==1
end
function c71400016.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,e:GetLabelObject():GetBaseAttack(),REASON_EFFECT)
e:Reset()
end
function c71400016.con2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c71400016.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c71400016.op2(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
......@@ -24,7 +24,7 @@ function c71400017.initial_effect(c)
e2:SetCost(c71400017.cost)
e2:SetOperation(c71400017.op2)
c:RegisterEffect(e2)
--self limitation & field activation
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400017,1)
end
function c71400017.filter1(c)
......
......@@ -11,34 +11,32 @@ function c71400018.initial_effect(c)
e1:SetCountLimit(1,71400018+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400018,0))
e1:SetTarget(c71400018.target)
e1:SetCost(c71400018.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetCost(c71400018.cost1)
e1:SetCondition(yume.YumeCon)
e1:SetOperation(c71400018.operation)
c:RegisterEffect(e1)
end
function c71400018.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c71400018.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
function c71400018.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c71400018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c71400018.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c71400018.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c71400018.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
local g1=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),TYPE_SPELL+TYPE_TRAP)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400018.limit(g:GetFirst()))
Duel.SetChainLimit(c71400018.limit(g1))
end
end
function c71400018.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(sg,REASON_EFFECT)
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
......@@ -46,8 +44,8 @@ function c71400018.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c71400018.limit(c)
function c71400018.limit(g)
return function (e,lp,tp)
return e:GetHandler()~=c
return not g:IsContains(e:GetHandler())
end
end
\ No newline at end of file
......@@ -40,7 +40,7 @@ function c71400020.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(fg,POS_FACEUP,REASON_EFFECT)<=0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400020,1))
local tc=Duel.SelectMatchingCard(tp,c71400020.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71400020.filter2),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
......@@ -57,9 +57,9 @@ function c71400020.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if tc:IsSetCard(0x3714) and flag and Duel.IsExistingMatchingCard(c71400020.filter3,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(71400020,0)) then
if tc:IsSetCard(0x3714) and flag and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c71400020.filter3),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(71400020,0)) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c71400020.filter3,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,ft,ft,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71400020.filter3),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,ft,ft,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......
......@@ -3,7 +3,7 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400021.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -11,33 +11,30 @@ function c71400021.initial_effect(c)
e1:SetCountLimit(1,71400021+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400021,0))
e1:SetTarget(c71400021.target)
e1:SetCost(c71400021.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetCondition(yume.YumeCon)
e1:SetOperation(c71400021.operation)
c:RegisterEffect(e1)
end
function c71400021.filter(c)
return c:IsType(TYPE_MONSTER)
end
function c71400021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c71400021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c71400021.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_MONSTER) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
local sg=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),tp,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400021.limit(g:GetFirst()))
end
end
function c71400021.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
local mg=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,nil)
if mg:GetCount()>0 and Duel.ChangePosition(mg,POS_FACEDOWN_DEFENSE)>0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
......
......@@ -31,8 +31,8 @@ end
function c71400022.filter1c(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c71400022.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c71400022.filter1(c,e,tp,zone)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c71400022.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......@@ -44,15 +44,18 @@ function c71400022.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST)
end
function c71400022.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400022.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if chk==0 then
local zone=e:GetHandler():GetLinkedZone(tp)
return Duel.IsExistingMatchingCard(c71400022.filter1,tp,LOCATION_HAND,0,1,nil,e,tp,zone) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c71400022.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local zone=e:GetHandler():GetLinkedZone(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400022.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c71400022.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c71400022.con2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -19,7 +19,7 @@ function c71400023.initial_effect(c)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400023,1))
e2:SetCategory(CATEGORY_BANISH)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
......@@ -36,9 +36,11 @@ function c71400023.filter1(c,tp)
end
function c71400023.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=yume.FieldActivation(tp)
local tc=yume.ActivateYumeField(tp)
if tc then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400023,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -59,7 +61,17 @@ function c71400023.op1(e,tp,eg,ep,ev,re,r,rp)
e4:SetTarget(c71400023.sumlimit)
tc:RegisterEffect(e4,true)
--]]
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(71400023,2))
if not c:IsStatus(STATUS_ACT_FROM_HAND) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.BreakEffect()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTargetRange(LOCATION_FZONE,0)
e2:SetTarget(c71400023.etarget)
e2:SetValue(c71400023.efilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function c71400023.setlimit(e,c)
......@@ -70,21 +82,33 @@ function c71400023.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
--]]
function c71400023.etarget(e,c)
return c:IsSetCard(0x3714) and c:IsType(TYPE_FIELD)
end
function c71400023.efilter(e,te,c)
return te:GetOwner()~=c
end
function c71400023.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,1,nil)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_BANISH,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
Duel.SetChainLimit(c71400023.limit(g1))
end
function c71400023.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==2 then
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function c71400023.limit(g)
return function (e,lp,tp)
return not g:IsContains(e:GetHandler())
end
end
\ No newline at end of file
......@@ -41,7 +41,7 @@ function c71400025.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,800)
end
function c71400025.op1(e,tp,eg,ep,ev,re,r,rp)
yume.FieldActivation(tp,nil,2)
yume.ActivateYumeField(tp,nil,2)
end
function c71400025.filter2(c)
return c:IsType(TYPE_LINK)
......
......@@ -114,7 +114,7 @@ function c71400027.tdop(e,tp,eg,ep,ev,re,r,rp)
end
function c71400027.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_FZONE) and chkc:IsControler(tp) and c71400027.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400027.filter2,tp,LOCATION_FZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c71400027.filter2,tp,LOCATION_FZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c71400027.filter2,tp,LOCATION_FZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......
......@@ -28,7 +28,7 @@ function c71400032.initial_effect(c)
e2:SetTarget(c71400032.tg2)
e2:SetOperation(c71400032.op2)
c:RegisterEffect(e2)
--self limitation & field activation
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400032,2)
end
function c71400032.op1(e,tp,eg,ep,ev,re,r,rp)
......@@ -80,8 +80,6 @@ function c71400032.op2(e,tp,eg,ep,ev,re,r,rp)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-500)
end
end
end
......
......@@ -3,29 +3,33 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400033.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_TOGRAVE,0)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_SPSUMMON+TIMING_SUMMON,0)
e1:SetCountLimit(1,71400033+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400033,0))
e1:SetTarget(c71400033.target)
e1:SetCost(c71400033.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetCondition(yume.YumeCon)
e1:SetOperation(c71400033.operation)
c:RegisterEffect(e1)
end
function c71400033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
function c71400033.filter(c)
return c:IsType(TYPE_MONSTER)
end
function c71400033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
if chkc then return chkc:IsOnField() and c71400033.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c71400033.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c71400033.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if fc and yume.YumeCheckFilter(fc) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,fc,1,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,0)
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400033.limit(g:GetFirst()))
end
......@@ -33,8 +37,13 @@ end
function c71400033.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetTurnPlayer()~=tp then
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-1500)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc and yume.YumeCheckFilter(fc) then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
......
......@@ -15,7 +15,7 @@ function c71400034.initial_effect(c)
e1:SetTarget(c71400034.tg1)
e1:SetOperation(c71400034.op1)
c:RegisterEffect(e1)
--self limitation & field activation
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400034,2)
end
function c71400034.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -43,13 +43,14 @@ end
function c71400034.op1(e,tp,eg,ep,ev,re,r,rp)
if not (e:GetHandler():IsRelateToEffect(e) and re:GetHandler():IsRelateToEffect(re)) then return end
if Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)==1 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil,tp)
if Duel.IsExistingMatchingCard(c71400034.filter1,tp,LOCATION_ONFIELD,0,1,nil) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400034,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
Duel.SetLP(tp,Duel.GetLP(tp)-1000)
end
end
end
\ No newline at end of file
......@@ -28,7 +28,7 @@ end
function c71400035.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if yume.YumeFieldCheck(tp) and Duel.SelectYesNo(tp,aux.Stringid(71400035,1)) then
yume.FieldActivation(tp)
yume.ActivateYumeField(tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400035.filter1,tp,LOCATION_DECK,0,1,1,nil)
......
......@@ -3,26 +3,52 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400037.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--self limitation & field activation
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400037,1)
--cannot be target
local e1a=Effect.CreateEffect(c)
e1a:SetType(EFFECT_TYPE_FIELD)
e1a:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e1a:SetRange(LOCATION_FZONE)
e1a:SetTargetRange(LOCATION_MZONE,0)
e1a:SetValue(aux.imval1)
c:RegisterEffect(e1a)
local e1b=Effect.CreateEffect(c)
e1b:SetType(EFFECT_TYPE_FIELD)
e1b:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1b:SetRange(LOCATION_FZONE)
e1b:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1b:SetTargetRange(LOCATION_MZONE,0)
e1b:SetTarget(c71400037.tg1)
e1b:SetValue(1)
c:RegisterEffect(e1b)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400037,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetTarget(c71400037.tg1)
e2:SetOperation(c71400037.op1)
c:RegisterEffect(e2)
end
function c71400037.tg1(e,c)
return c:IsSetCard(0x714)
function c71400037.filter(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400037.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400037.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c71400037.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c71400037.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c71400037.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and c: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_IGNORE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetDescription(aux.Stringid(71400037,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(aux.imval1)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
......@@ -48,10 +48,10 @@ function c71400038.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c71400038.tg3)
e3:SetValue(aux.indoval)
e3:SetValue(1)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
......
......@@ -3,7 +3,7 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400041.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--self limitation & field activation
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400041,2)
--to grave
local e1=Effect.CreateEffect(c)
......
......@@ -31,7 +31,7 @@ function c71400042.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetTarget(c71400042.tg3)
e3:SetOperation(c71400042.op3)
e3:SetCondition(c71400042.con3)
e3:SetCost(c71400042.cost3)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e3)
--transform
......@@ -52,6 +52,10 @@ function c71400042.initial_effect(c)
e4:SetTarget(c71400042.tg4)
e4:SetOperation(c71400042.op4)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(71400042,ACTIVITY_SPSUMMON,c71400042.counterfilter)
end
function c71400042.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_XYZ)
end
function c71400042.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -71,6 +75,20 @@ function c71400042.dircon(e)
return Duel.IsExistingMatchingCard(c71400042.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c71400042.cfilter2,tp,0,LOCATION_MZONE,1,nil)
end
function c71400042.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71400025,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c71400042.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c71400042.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsType(TYPE_XYZ)) and c:IsLocation(LOCATION_EXTRA)
end
function c71400042.filter3(c)
local flag=false
if c:IsLocation(LOCATION_HAND) then flag=c:IsSetCard(0x714)
......@@ -80,12 +98,6 @@ end
function c71400042.xyzfilter(c,e,tp)
return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c71400042.linkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c71400042.con3(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c71400042.linkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c71400042.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......
......@@ -82,16 +82,16 @@ end
function c71400043.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
local num=0
if fc and fc:IsFaceup() then num=fc:GetCode() end
return yume.YumeFieldCheck(tp,num,2,LOCATION_GRAVE+LOCATION_DECK)
local id=0
if fc and fc:IsFaceup() then id=fc:GetCode() end
return yume.YumeFieldCheck(tp,id,2,LOCATION_GRAVE+LOCATION_DECK)
end
end
function c71400043.op2(e,tp,eg,ep,ev,re,r,rp)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
local num=0
if fc and fc:IsFaceup() then num=fc:GetCode() end
yume.FieldActivation(tp,num,2,LOCATION_GRAVE+LOCATION_DECK)
local id=0
if fc and fc:IsFaceup() then id=fc:GetCode() end
yume.ActivateYumeField(tp,id,2,LOCATION_GRAVE+LOCATION_DECK)
end
function c71400043.con3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,71400038)>0
......
......@@ -3,7 +3,7 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400049.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--self limitation & field activation
--self to deck & field activation
yume.AddYumeFieldGlobal(c,71400049,1)
--special summon
local e1=Effect.CreateEffect(c)
......
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