Commit 1d22f0b9 authored by VanillaSalt's avatar VanillaSalt

fix

parent 3a1582eb
......@@ -14,16 +14,22 @@ function c15545291.initial_effect(c)
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15545291,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(c15545291.descon)
e2:SetTarget(c15545291.destg)
e2:SetOperation(c15545291.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(15545291,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c15545291.descon)
e3:SetTarget(c15545291.destg)
e3:SetOperation(c15545291.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c15545291.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c15545291.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
......@@ -53,12 +59,8 @@ function c15545291.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c15545291.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
local mg=e:GetHandler():GetMaterial()
if mg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) then
e:SetLabel(1)
if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetLabel(0)
end
end
function c15545291.dfilter(c,e)
......
......@@ -68,13 +68,13 @@ function c18175965.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function c18175965.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c18175965.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
function c18175965.filter(c,ec)
......
......@@ -99,7 +99,6 @@ function c21113684.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
e:GetHandler():RegisterFlagEffect(21113684,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c21113684.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
......@@ -24,6 +24,12 @@ function c23689697.initial_effect(c)
e3:SetTarget(c23689697.destg)
e3:SetOperation(c23689697.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c23689697.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c23689697.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
......@@ -53,8 +59,7 @@ function c23689697.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c23689697.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
local mg=e:GetHandler():GetMaterial()
if mg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) then
if e:GetLabel()==1 then
Duel.SetChainLimit(c23689697.chlimit)
end
end
......@@ -67,3 +72,11 @@ function c23689697.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(sg,REASON_EFFECT)
end
function c23689697.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
......@@ -9,7 +9,6 @@ function c269012.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c269012.target)
......@@ -18,9 +17,8 @@ function c269012.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c269012.target)
e3:SetValue(1)
c:RegisterEffect(e3)
......
......@@ -18,7 +18,7 @@ function c32623004.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetCode(EFFECT_TO_HAND_REDIRECT)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c32623004.rmtg)
e2:SetValue(LOCATION_REMOVED)
......@@ -37,6 +37,5 @@ function c32623004.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c32623004.rmtg(e,c)
return c:GetDestination()==LOCATION_HAND
and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():GetHandler():IsSetCard(0x5a)
return c:IsReason(REASON_EFFECT) and c:GetReasonEffect():GetHandler():IsSetCard(0x5a)
end
......@@ -5,7 +5,9 @@ function c42233477.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c42233477.condition)
e1:SetTarget(c42233477.target)
e1:SetOperation(c42233477.activate)
c:RegisterEffect(e1)
......@@ -18,6 +20,9 @@ function c42233477.initial_effect(c)
e2:SetOperation(c42233477.desop)
c:RegisterEffect(e2)
end
function c42233477.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c42233477.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
......
......@@ -6,9 +6,10 @@ function c43694481.initial_effect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1,43694481)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c43694481.damcon)
e1:SetCost(c43694481.damcost)
e1:SetTarget(c43694481.damtg)
e1:SetOperation(c43694481.damop)
c:RegisterEffect(e1)
......@@ -16,6 +17,10 @@ end
function c43694481.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttack()>e:GetHandler():GetBaseAttack()
end
function c43694481.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,43694481)==0 end
Duel.RegisterFlagEffect(tp,43694481,RESET_PHASE+PHASE_END,0,1)
end
function c43694481.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......
......@@ -4,6 +4,8 @@ function c49838105.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c49838105.target1)
e1:SetOperation(c49838105.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
......@@ -12,8 +14,9 @@ function c49838105.initial_effect(c)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c49838105.condition)
e2:SetTarget(c49838105.target)
e2:SetTarget(c49838105.target2)
e2:SetOperation(c49838105.operation)
e2:SetLabel(1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
......@@ -30,11 +33,18 @@ end
function c49838105.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c49838105.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c49838105.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(49838105,2)) then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c49838105.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
function c49838105.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
......
......@@ -7,11 +7,16 @@ function c51282878.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,51282878)
e1:SetCountLimit(1)
e1:SetCost(c51282878.cost)
e1:SetTarget(c51282878.target)
e1:SetOperation(c51282878.operation)
c:RegisterEffect(e1)
end
function c51282878.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,51282878)==0 end
Duel.RegisterFlagEffect(tp,51282878,RESET_PHASE+PHASE_END,0,1)
end
function c51282878.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -23,6 +23,12 @@ function c69230391.initial_effect(c)
e3:SetTarget(c69230391.target)
e3:SetOperation(c69230391.operation)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c69230391.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c69230391.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
......@@ -46,12 +52,8 @@ end
function c69230391.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
local mg=e:GetHandler():GetMaterial()
if mg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) then
e:SetLabel(1)
if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
else
e:SetLabel(0)
end
end
function c69230391.operation(e,tp,eg,ep,ev,re,r,rp)
......@@ -70,3 +72,11 @@ function c69230391.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
function c69230391.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
......@@ -24,6 +24,12 @@ function c69327790.initial_effect(c)
e3:SetTarget(c69327790.tdtg)
e3:SetOperation(c69327790.tdop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c69327790.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c69327790.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
......@@ -52,16 +58,12 @@ function c69327790.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local mg=e:GetHandler():GetMaterial()
if mg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND)
if e:GetLabel()==1
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g1:GetFirst())
and Duel.SelectYesNo(tp,aux.Stringid(69327790,2)) then
e:SetLabel(1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g3=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g3,1,0,0)
else
e:SetLabel(0)
end
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0)
......@@ -84,3 +86,11 @@ function c69327790.tdop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c69327790.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
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