Commit 828eed0d authored by VanillaSalt's avatar VanillaSalt

fix

parent 1fb29f9c
......@@ -11,7 +11,7 @@ function c14507213.initial_effect(c)
c:RegisterEffect(e1)
end
function c14507213.filter(c)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(nil)
return c:IsFaceup() and c:IsCanBeSynchroMaterial()
end
function c14507213.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end
......
......@@ -24,7 +24,7 @@ function c17536995.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c17536995.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c17536995.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
......
......@@ -22,8 +22,7 @@ function c2333365.filter(c)
return c:IsFaceup() and c:IsSetCard(0x42)
end
function c2333365.descon(e)
local c=e:GetHandler()
return not Duel.IsExistingMatchingCard(c2333365.filter,c:GetControler(),LOCATION_MZONE,0,1,c)
return not Duel.IsExistingMatchingCard(c2333365.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
end
function c2333365.tg(e,c)
return c:GetCode()~=2333365 and c:IsSetCard(0x42)
......
......@@ -11,7 +11,7 @@ function c30915572.initial_effect(c)
c:RegisterEffect(e1)
end
function c30915572.sptarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
......
......@@ -32,7 +32,7 @@ function c32086564.check(c,tp)
end
function c32086564.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil
and c32086564.check(Duel.GetAttacker(),tp) or c32086564.check(Duel.GetAttackTarget(),tp) end
and (c32086564.check(Duel.GetAttacker(),tp) or c32086564.check(Duel.GetAttackTarget(),tp)) end
if c32086564.check(Duel.GetAttacker(),tp) then
Duel.SetTargetCard(Duel.GetAttackTarget())
else
......
......@@ -48,7 +48,7 @@ function c35262428.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(1)
tc:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(e:GetHandler())
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
......@@ -56,12 +56,14 @@ function c35262428.activate(e,tp,eg,ep,ev,re,r,rp)
e4:SetOperation(c35262428.ctlop)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetLabel(1-tp)
tc:RegisterEffect(e4,true)
end
end
function c35262428.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
if not Duel.GetControl(tc,1-tp) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
local p=e:GetLabel()
if tc:GetControler()~=p and not Duel.GetControl(tc,p) and not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
......@@ -32,23 +32,6 @@ end
function c38525760.tgvalue(e,re,rp)
return rp~=e:GetHandlerPlayer()
end
function c38525760.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_FIRE) end
local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_FIRE)
Duel.Release(g,REASON_COST)
end
function c38525760.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
function c38525760.ntcon(e,c)
if c==nil then return true end
local mi,ma=c:GetTributeRequirement()
......@@ -73,7 +56,7 @@ function c38525760.filter(c)
end
function c38525760.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c38525760.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCARION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c38525760.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -25,7 +25,7 @@ end
function c43138260.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_COST)
and Duel.CheckRemoveOverlayCard(c:GetControler(),1,0,2,REASON_COST)
end
function c43138260.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_COST)
......
......@@ -37,7 +37,7 @@ end
function c43708041.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c43708041.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c43708041.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c43708041.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......
......@@ -57,7 +57,8 @@ function c43748308.spfilter(c,e,tp)
end
function c43748308.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c43748308.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c43748308.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c43748308.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c43748308.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
......@@ -21,10 +21,10 @@ function c44046281.initial_effect(c)
c:RegisterEffect(e2)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(78474168,1))
e2:SetDescription(aux.Stringid(44046281,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c44046281.spcon)
e2:SetTarget(c44046281.sptg)
......
......@@ -2,29 +2,27 @@
function c48768179.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(48768179,0))
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c48768179.condition)
e1:SetTarget(c48768179.target)
e1:SetOperation(c48768179.operation)
c:RegisterEffect(e1)
end
function c48768179.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and r==REASON_BATTLE and eg:GetFirst()==e:GetHandler()
return ep~=tp
end
function c48768179.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,1)
or Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end
local op=0
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48768179,0))
if Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then
and Duel.IsPlayerCanDiscardDeck(1-tp,1) then
op=Duel.SelectOption(tp,aux.Stringid(48768179,1),aux.Stringid(48768179,2))
elseif Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 then
elseif Duel.IsPlayerCanDiscardDeck(1-tp,1) then
Duel.SelectOption(tp,aux.Stringid(48768179,2))
op=1
else
......@@ -36,10 +34,10 @@ function c48768179.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
e:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
else
Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1)
e:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e:SetProperty(0)
end
end
function c48768179.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -4,17 +4,32 @@ function c56981417.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c56981417.condition)
e1:SetCost(c56981417.cost)
e1:SetTarget(c56981417.target)
e1:SetOperation(c56981417.operation)
c:RegisterEffect(e1)
end
function c56981417.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function c56981417.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c56981417.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c56981417.cffilter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic()
end
function c56981417.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,56981417)==0 end
Duel.RegisterFlagEffect(tp,56981417,RESET_EVENT+0x1fe0000,0,1)
if chk==0 then return Duel.GetFlagEffect(tp,56981417)==0
and Duel.IsExistingMatchingCard(c56981417.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c56981417.cffilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.RegisterFlagEffect(tp,56981417,RESET_PHASE+PHASE_END,0,1)
end
function c56981417.filter(c)
return c:IsSetCard(0x106e) and c:GetType()==TYPE_SPELL and c:CheckActivateEffect(true,true,false)~=nil
return c:IsSetCard(0x106e) and c:GetCode()~=56981417 and c:GetType()==TYPE_SPELL and c:CheckActivateEffect(true,true,false)~=nil
end
function c56981417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c56981417.filter(chkc) end
......
......@@ -18,7 +18,7 @@ function c57103969.initial_effect(c)
c:RegisterEffect(e2)
end
function c57103969.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,57103969) end
if chk==0 then return Duel.GetFlagEffect(tp,57103969)==0 end
Duel.RegisterFlagEffect(tp,57103969,RESET_PHASE+PHASE_END,0,1)
end
function c57103969.filter(c)
......
......@@ -54,7 +54,7 @@ function c60992464.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c60992464.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c60992464.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c60992464.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -41,13 +41,13 @@ function c6353603.setop(e,tp,eg,ep,ev,re,r,rp)
end
function c6353603.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c6353603.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(c6353603.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c6353603.filter2(c)
return c:IsDestructable()
end
function c6353603.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c6353603.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c6353603.filter2(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c6353603.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
......
......@@ -27,7 +27,7 @@ function c6713443.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c6713443.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c2521011.sfilter(c)
function c6713443.sfilter(c)
return c:IsSetCard(0x7c) and c:GetCode()~=6713443 and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c6713443.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -36,17 +36,17 @@ function c6713443.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c6713443.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp)
if g:GetCount()==0 then return end
ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if ct>0 then
local ft2=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft2>ct then ft2=ct end
if ft2<=0 then return end
local sg=Duel.GetMatchingGroup(c2521011.sfilter,tp,LOCATION_DECK,0,nil)
local sg=Duel.GetMatchingGroup(c6713443.sfilter,tp,LOCATION_DECK,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(6713443,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local setg=sg:Select(tp,1,ft2,nil)
Duel.SSet(tp,sg)
Duel.SSet(tp,setg)
end
end
end
......@@ -28,5 +28,6 @@ end
function c691925.activate(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)
Duel.BreakEffect()
Duel.DiscardDeck(tp,2,REASON_EFFECT)
end
......@@ -43,13 +43,13 @@ function c70355994.setop(e,tp,eg,ep,ev,re,r,rp)
end
function c70355994.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c70355994.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingTarget(c70355994.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c70355994.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c70355994.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c70355994.filter(chkc) end
if chkc then return chkc:IsOnField() and c70355994.filter2(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c70355994.filter1,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c70355994.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
......
--ツーヘッド·シャーク
--スピア·シャーク
function c70655556.initial_effect(c)
--lvup
local e1=Effect.CreateEffect(c)
......
......@@ -73,7 +73,7 @@ function c71071546.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c71071546.filter(c)
return (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsAbleToHand()
return (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c71071546.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71071546.filter(chkc) end
......
......@@ -14,7 +14,7 @@ function c71541986.initial_effect(c)
end
function c71541986.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousPosition(POS_FACEDOWN)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
end
function c71541986.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -27,5 +27,5 @@ function c74010769.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c74010769.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
and not Duel.IsExistingMatchingCard(c74010769.cfilter,c:GetControler(),LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
end
......@@ -26,11 +26,11 @@ function c75132317.initial_effect(c)
e2:SetOperation(c75132317.drop)
c:RegisterEffect(e2)
end
function c75132317.tgfilter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
function c75132317.tgfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c75132317.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c75132317.tgfilter,1,nil)
return eg:IsExists(c75132317.tgfilter,1,nil,tp)
end
function c75132317.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable()
......
......@@ -2,24 +2,22 @@
function c76922029.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76922029,0))
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c76922029.condition)
e1:SetTarget(c76922029.target)
e1:SetOperation(c76922029.operation)
c:RegisterEffect(e1)
end
function c76922029.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and r==REASON_BATTLE and eg:GetFirst()==e:GetHandler()
return ep~=tp
end
function c76922029.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1 end
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 or Duel.IsPlayerCanDiscardDeck(1-tp,2) end
local op=0
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(76922029,0))
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1 then
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsPlayerCanDiscardDeck(1-tp,2) then
op=Duel.SelectOption(tp,aux.Stringid(76922029,1),aux.Stringid(76922029,2))
elseif Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then
Duel.SelectOption(tp,aux.Stringid(76922029,1))
......@@ -30,7 +28,7 @@ function c76922029.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
e:SetLabel(op)
if op==0 then Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1)
else Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,1) end
else Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,1-tp,2) end
end
function c76922029.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
......
......@@ -29,7 +29,7 @@ function c79206750.filter(c)
return c:IsFaceup() and c:IsSetCard(0x74)
end
function c79206750.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c79206750.filter(tp) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c79206750.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c79206750.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c79206750.filter,tp,LOCATION_MZONE,0,1,1,nil)
......
--エヴォルダー·ケラト
function c80651316.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c80651316.atkcon)
e1:SetOperation(c80651316.atkop)
c:RegisterEffect(e1)
end
function c80651316.atkcon(e,tp,eg,ep,ev,re,r,rp)
local st=e:GetHandler():GetSummonType()
return st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180)
end
function c80651316.evolreg(c)
function c80651316.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -17,7 +31,7 @@ function c80651316.evolreg(c)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetTarget(c80651316.schtg)
e2:SetOperation(c80651316.schop)
e2:SetReset(RESET_EVENT+0x1ff0000)
e2:SetReset(RESET_EVENT+0x1620000)
c:RegisterEffect(e2)
end
function c80651316.sfilter(c)
......
......@@ -15,7 +15,8 @@ function c81172176.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c81172176.activate(e,tp,eg,ep,ev,re,r,rp)
local coin=Duel.SelectOption(tp,60,61)
local res=Duel.TossCoin(tp,1)
if res==1 then Duel.Remove(Duel.GetFieldGroup(tp,0,LOCATION_GRAVE),POS_FACEUP,REASON_EFFECT)
if coin~=res then Duel.Remove(Duel.GetFieldGroup(tp,0,LOCATION_GRAVE),POS_FACEUP,REASON_EFFECT)
else Duel.DiscardDeck(tp,Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE),REASON_EFFECT) end
end
......@@ -34,7 +34,7 @@ end
function c83108603.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83108603.xyzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c83108603.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c83108603.matfilter,tp,LOCATION_MZONE,0,1,nil) end
and Duel.IsExistingMatchingCard(c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c83108603.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
......@@ -42,7 +42,7 @@ function c83108603.matop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c83108603.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
......
......@@ -54,7 +54,7 @@ function c83438826.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c83438826.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c83438826.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83438826.eqfilter1 end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83438826.eqfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c83438826.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c83438826.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -12,10 +12,10 @@ function c85446833.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c21831848.target)
e1:SetTarget(c85446833.target)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function c21831848.target(e,c)
function c85446833.target(e,c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:GetAttack()==0
end
......@@ -6,10 +6,9 @@ function c96381979.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96381979,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c96381979.setcon)
e1:SetTarget(c96381979.settg)
e1:SetOperation(c96381979.setop)
c:RegisterEffect(e1)
......@@ -27,6 +26,7 @@ function c96381979.initial_effect(c)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(96381979,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_TO_GRAVE)
......
......@@ -34,7 +34,7 @@ function c99348756.spfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c99348756.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c99348756.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c99348756.spfilter(chkc,e,tp) end
local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_GRAVE,0,e:GetHandler(),RACE_WARRIOR)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsAbleToRemoveAsCost()
......
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