Commit 856a4348 authored by argon.sun's avatar argon.sun

new scripts

parent c758619d
......@@ -49,7 +49,7 @@ function c15013468.cfilter(c)
end
function c15013468.spcon(e,c)
if c==nil then return true end
return Duel.CheckLPCost(c:GetControler(),500)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.CheckLPCost(c:GetControler(),500)
and Duel.IsExistingMatchingCard(c15013468.cfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c15013468.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
--デスカウンター
function c39131963.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(39131963,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c39131963.condition)
e2:SetTarget(c39131963.target)
e2:SetOperation(c39131963.operation)
c:RegisterEffect(e2)
end
function c39131963.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==nil
end
function c39131963.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c39131963.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--ダメージ=レプトル
function c44584775.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(44584775,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c44584775.condition)
e2:SetTarget(c44584775.target)
e2:SetOperation(c44584775.activate)
c:RegisterEffect(e2)
end
function c44584775.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return ep==tp and (a:IsRace(RACE_REPTILE) or (d and d:IsRace(RACE_REPTILE)))
end
function c44584775.filter(c,e,tp,dam)
return c:IsAttackBelow(dam) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c44584775.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c44584775.filter,tp,LOCATION_DECK,0,1,nil,e,tp,ev) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c44584775.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c44584775.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ev)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--トラップ·マスター
function c46461247.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46461247,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c46461247.target)
e1:SetOperation(c46461247.operation)
c:RegisterEffect(e1)
end
function c46461247.filter(c)
return c:IsFacedown() or c:IsType(TYPE_TRAP)
end
function c46461247.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c46461247.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c46461247.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler())
if g:GetCount()>0 and g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function c46461247.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end
if tc:IsType(TYPE_TRAP) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
--ミスト・ボディ
function c47529357.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c47529357.target)
e1:SetOperation(c47529357.operation)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c47529357.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c47529357.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--サンド·ギャンブラー
function c50593156.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50593156,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c50593156.destg)
e1:SetOperation(c50593156.desop)
c:RegisterEffect(e1)
end
function c50593156.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3)
end
function c50593156.desop(e,tp,eg,ep,ev,re,r,rp)
local c1,c2,c3=Duel.TossCoin(tp,3)
if c1+c2+c3==3 then
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
elseif c1+c2+c3==0 then
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil)
Duel.Destroy(g,REASON_EFFECT)
end
end
--スフィンクス・テーレイア
function c51402177.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_GRAEV)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c51402177.spcon)
e2:SetOperation(c51402177.spop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(51402177,0))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c51402177.damcon)
e3:SetTarget(c51402177.damtg)
e3:SetOperation(c51402177.damop)
c:RegisterEffect(e3)
--cannot attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(c51402177.atklimit)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c51402177.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c51402177.cfilter(c)
return c:IsFaceup() and c:IsCode(53569894)
end
function c51402177.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.CheckLPCost(c:GetControler(),500)
and Duel.IsExistingMatchingCard(c51402177.cfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c51402177.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.PayLPCost(tp,500)
end
function c51402177.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and bit.band(bc:GetBattlePosition(),POS_DEFENCE)~=0
end
function c51402177.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dam=e:GetHandler():GetBattleTarget():GetBaseDefence()/2
if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c51402177.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
......@@ -28,6 +28,7 @@ function c5183693.initial_effect(c)
e4:SetDescription(aux.Stringid(5183693,0))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:Setproperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetTarget(c5183693.tdtg)
e4:SetOperation(c5183693.tdop)
......
--スピリットバリア
function c53239672.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--avoid battle damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(c53239672.condition)
c:RegisterEffect(e2)
end
function c53239672.condition(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>0
end
--光のピラミッド
function c53569894.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c53569894.leave)
c:RegisterEffect(e2)
end
function c53569894.filter(c)
local code=c:GetCode()
return c:IsFaceup() and (code==15013468 or code==51402177) and c:IsDestructable()
end
function c53569894.leave(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then
local g=Duel.GetMatchingGroup(c53569894.filter,tp,LOCATION_ONFIELD,0,nil)
Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED)
end
end
--永遠の渇水
function c56606928.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c56606928.target)
e1:SetOperation(c56606928.activate)
c:RegisterEffect(e1)
end
function c56606928.filter(c)
return c:IsRace(RACE_FISH) and c:IsFaceup() and c:IsDestructable()
end
function c56606928.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c56606928.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(c56606928.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c56606928.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c56606928.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--エンジェルO7
function c56784842.initial_effect(c)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c56784842.regop)
c:RegisterEffect(e1)
end
function c56784842.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetSummonType()~=SUMMON_TYPE_ADVANCE then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1)
e1:SetValue(c56784842.aclimit)
c:RegisterEffect(e1)
end
function c56784842.aclimit(e,re,tp)
return re:GetHandler():IsType(TYPE_MONSTER)
end
--悪夢の鉄檻
function c58775978.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c58775978.activate)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
c:RegisterEffect(e2)
--remain field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c58775978.desop)
c:RegisterEffect(e4)
end
function c58775978.activate(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():SetTurnCounter(0)
end
function c58775978.desop(e,tp,eg,ep,ev,re,r,rp)
if tp==Duel.GetTurnPlayer() then return end
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==2 then
Duel.Destroy(c,REASON_RULE)
end
end
......@@ -62,9 +62,5 @@ function c6061630.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c6061630.sfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,lv,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.ConfirmCards(1-tp,hg)
Duel.ShuffleHand(tp)
end
end
......@@ -23,8 +23,8 @@ function c6544078.filter(c)
end
function c6544078.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c6544078.filter,tp,LOCATION_HAND,0,1,nil)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c6544078.filter,c:GetControler(),LOCATION_HAND,0,1,nil)
end
function c6544078.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
--ヂェミナイ・デビル
function c67688478.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67688478,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c67688478.condition)
e1:SetCost(c67688478.cost)
e1:SetTarget(c67688478.target)
e1:SetOperation(c67688478.operation)
c:RegisterEffect(e1)
end
function c67688478.condition(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or (not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:IsActiveType(TYPE_MONSTER))
or (not Duel.IsChainInactivatable(ev)) then return false end
local ex,tg,tc,p=Duel.GetOperationInfo(ev,CATEGORY_HANDES)
return re:IsHasCategory(CATEGORY_HANDES) and (not ex or p~=1-tp)
end
function c67688478.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c67688478.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c67688478.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--守護天使 ジャンヌ
function c68007326.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68007326,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c68007326.reccon)
e1:SetTarget(c68007326.rectg)
e1:SetOperation(c68007326.recop)
c:RegisterEffect(e1)
end
function c68007326.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE)
end
function c68007326.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local rec=bc:GetBaseAttack()
if rec<0 then rec=0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function c68007326.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--ロイヤルナイツ
function c68280530.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68280530,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c68280530.reccon)
e1:SetTarget(c68280530.rectg)
e1:SetOperation(c68280530.recop)
c:RegisterEffect(e1)
end
function c68280530.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function c68280530.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local rec=bc:GetDefence()
if rec<0 then rec=0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function c68280530.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--シルフィード
function c73001017.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c73001017.spcon)
e1:SetOperation(c73001017.spop)
c:RegisterEffect(e1)
--handes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(73001017,0))
e2:SetCategory(CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCondition(c73001017.condition)
e2:SetTarget(c73001017.target)
e2:SetOperation(c73001017.operation)
c:RegisterEffect(e2)
end
function c73001017.spfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToRemoveAsCost()
end
function c73001017.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c73001017.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c73001017.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c73001017.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c73001017.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c73001017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1)
end
function c73001017.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
--インフェルノ
function c74823665.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c74823665.spcon)
e1:SetOperation(c74823665.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74823665,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCondition(c74823665.damcon)
e2:SetTarget(c74823665.damtg)
e2:SetOperation(c74823665.damop)
c:RegisterEffect(e2)
end
function c74823665.spfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost()
end
function c74823665.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c74823665.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c74823665.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c74823665.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c74823665.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c74823665.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
function c74823665.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
......@@ -12,7 +12,8 @@ function c78613627.initial_effect(c)
c:RegisterEffect(e1)
end
function c78613627.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==e:GetHandler() and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefence()
return Duel.GetAttackTarget()==e:GetHandler() and e:Gethandler():IsDefence()
and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefence()
end
function c78613627.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
--神秘の中華なべ
function c80161395.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c80161395.cost)
e1:SetTarget(c80161395.target)
e1:SetOperation(c80161395.activate)
c:RegisterEffect(e1)
end
function c80161395.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
local tc=sg:GetFirst()
local atk=tc:GetAttack()
local def=tc:GetDefence()
Duel.Release(tc,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(80161395,0))
local sel=Duel.SelectOption(tp,aux.Stringid(80161395,1),aux.Stringid(80161395,2))
if sel==0 then e:SetLabel(atk)
else e:SetLabel(def) end
end
function c80161395.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel())
end
function c80161395.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--水晶の占い師
function c82099401.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(82099401,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetOperation(c82099401.operation)
c:RegisterEffect(e1)
end
function c82099401.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<2 then return end
Duel.ConfirmDecktop(tp,2)
local g=Duel.GetDecktopGroup(tp,2)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local add=g:Select(tp,1,1,nil)
if add:GetFirst():IsAbleToHand() then
Duel.SendtoHand(add,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,add)
Duel.ShuffleHand(tp)
else
Duel.SendtoGrave(add,REASON_EFFECT)
end
local back=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(back:GetFirst(),1)
end
end
--ɥ
function c82108372.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c82108372.val)
c:RegisterEffect(e1)
end
function c82108372.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_FAIRY)*200
end
--針二千本
function c83228073.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(83228073,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(c83228073.condition)
e1:SetTarget(c83228073.target)
e1:SetOperation(c83228073.operation)
c:RegisterEffect(e1)
end
function c83228073.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():IsDefence()
and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefence()
end
function c83228073.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0)
end
function c83228073.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end
Duel.Destroy(a,REASON_EFFECT)
end
--スフィンクス・アンドロジュネス
function c87997872.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87997872,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c87997872.spcon)
e2:SetCost(c87997872.cost)
e2:SetTarget(c87997872.sptg)
e2:SetOperation(c87997872.spop)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87997872,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCost(c87997872.cost)
e3:SetOperation(c87997872.atkop)
c:RegisterEffect(e3)
end
function c87997872.cfilter(c,tp,code)
return c:IsCode(code) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY)
end
function c87997872.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c87997872.cfilter,1,nil,tp,15013468)
and eg:IsExists(c87997872.cfilter,1,nil,tp,51402177)
end
function c87997872.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 c87997872.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,false) end
Duel.ConfirmCards(1-tp,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_HAND) then
Duel.ShuffleHand(tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c87997872.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)
end
end
function c87997872.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(3000)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--魔女狩り
function c90330453.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c90330453.target)
e1:SetOperation(c90330453.activate)
c:RegisterEffect(e1)
end
function c90330453.filter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup() and c:IsDestructable()
end
function c90330453.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90330453.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(c90330453.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c90330453.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c90330453.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--戦士抹殺
function c90873992.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c90873992.target)
e1:SetOperation(c90873992.activate)
c:RegisterEffect(e1)
end
function c90873992.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsFaceup() and c:IsDestructable()
end
function c90873992.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90873992.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(c90873992.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c90873992.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c90873992.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--トゲトゲ神の殺虫剤
function c94716515.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c94716515.target)
e1:SetOperation(c94716515.activate)
c:RegisterEffect(e1)
end
function c94716515.filter(c)
return c:IsRace(RACE_INSECT) and c:IsFaceup() and c:IsDestructable()
end
function c94716515.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c94716515.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(c94716515.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c94716515.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c94716515.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--秒殺の暗殺者
function c96890582.initial_effect(c)
--atkdown
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c96890582.val)
c:RegisterEffect(e1)
--defdown
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
end
function c96890582.val(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*(-400)
end
......@@ -2,7 +2,7 @@
#nickname & gamename should be less than 20 characters
use_d3d = 0
antialias = 2
errorlog = 1
errorlog = 0
nickname = Player
gamename = Game
lastdeck = test
......
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