Commit 8cd289f4 authored by argon.sun's avatar argon.sun

new

parent 94fc478e
...@@ -370,6 +370,7 @@ public: ...@@ -370,6 +370,7 @@ public:
#define STATUS_JUST_POS 0x1000000 #define STATUS_JUST_POS 0x1000000
#define STATUS_CONTINUOUS_POS 0x2000000 #define STATUS_CONTINUOUS_POS 0x2000000
#define STATUS_IS_PUBLIC 0x4000000 #define STATUS_IS_PUBLIC 0x4000000
#define STATUS_ACT_FROM_HAND 0x8000000
//Counter //Counter
#define COUNTER_NEED_PERMIT 0x1000 #define COUNTER_NEED_PERMIT 0x1000
#define COUNTER_NEED_ENABLE 0x2000 #define COUNTER_NEED_ENABLE 0x2000
......
...@@ -1098,6 +1098,8 @@ int32 scriptlib::card_is_able_to_remove(lua_State *L) { ...@@ -1098,6 +1098,8 @@ int32 scriptlib::card_is_able_to_remove(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
uint32 p = pcard->pduel->game_field->core.reason_player; uint32 p = pcard->pduel->game_field->core.reason_player;
if(lua_gettop(L) >= 2)
p = lua_tointeger(L, 2);
if(pcard->is_removeable(p)) if(pcard->is_removeable(p))
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
else else
......
...@@ -2652,6 +2652,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -2652,6 +2652,7 @@ int32 field::process_battle_command(uint16 step) {
return FALSE; return FALSE;
} }
case 7: { case 7: {
core.chain_attack = 0;
core.attack_cancelable = TRUE; core.attack_cancelable = TRUE;
core.sub_attacker = 0; core.sub_attacker = 0;
core.sub_attack_target = (card*)0xffffffff; core.sub_attack_target = (card*)0xffffffff;
...@@ -3783,9 +3784,12 @@ int32 field::add_chain(uint16 step) { ...@@ -3783,9 +3784,12 @@ int32 field::add_chain(uint16 step) {
break_effect(); break_effect();
if (peffect->handler->current.location == LOCATION_HAND) { if (peffect->handler->current.location == LOCATION_HAND) {
peffect->handler->enable_field_effect(FALSE); peffect->handler->enable_field_effect(FALSE);
peffect->handler->set_status(STATUS_ACT_FROM_HAND, TRUE);
move_to_field(peffect->handler, peffect->handler->current.controler, peffect->handler->current.controler, LOCATION_SZONE, POS_FACEUP); move_to_field(peffect->handler, peffect->handler->current.controler, peffect->handler->current.controler, LOCATION_SZONE, POS_FACEUP);
} else } else {
peffect->handler->set_status(STATUS_ACT_FROM_HAND, FALSE);
change_position(peffect->handler, 0, peffect->handler->current.controler, POS_FACEUP, 0); change_position(peffect->handler, 0, peffect->handler->current.controler, POS_FACEUP, 0);
}
} }
if(peffect->handler->current.location & 0x30) if(peffect->handler->current.location & 0x30)
move_card(peffect->handler->current.controler, peffect->handler, peffect->handler->current.location, 0); move_card(peffect->handler->current.controler, peffect->handler, peffect->handler->current.location, 0);
......
--神竜-エクセリオン
function c10032958.initial_effect(c)
--to defence
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10032958,0))
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c10032958.effop)
c:RegisterEffect(e1)
end
function c10032958.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,10032958)
if ct>3 then ct=3 end
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local opt1=Duel.SelectOption(tp,aux.Stringid(10032958,1),aux.Stringid(10032958,2),aux.Stringid(10032958,3))
local opt2=0
local opt3=0
c10032958.reg(c,opt1)
if ct<2 then return end
if opt1==0 then opt2=Duel.SelectOption(tp,aux.Stringid(10032958,2),aux.Stringid(10032958,3))+1
elseif opt1==2 then opt2=Duel.SelectOption(tp,aux.Stringid(10032958,1),aux.Stringid(10032958,2))
else
opt2=Duel.SelectOption(tp,aux.Stringid(10032958,1),aux.Stringid(10032958,3))
if opt2==1 then opt2=2 end
end
c10032958.reg(c,opt2)
if ct<3 then return end
if opt1~=0 and opt2~=0 then opt3=Duel.SelectOption(tp,aux.Stringid(10032958,1))
elseif opt1~=1 and opt2~=1 then opt3=Duel.SelectOption(tp,aux.Stringid(10032958,2))+1
else opt3=Duel.SelectOption(tp,aux.Stringid(10032958,3))+2 end
c10032958.reg(c,opt3)
end
end
function c10032958.reg(c,opt)
if opt==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
elseif opt==1 then
--chain attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10032958,2))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_END)
e1:SetCondition(c10032958.atcon)
e1:SetOperation(c10032958.atop)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
else
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10032958,3))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c10032958.damcon)
e1:SetTarget(c10032958.damtg)
e1:SetOperation(c10032958.damop)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
function c10032958.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
end
function c10032958.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
function c10032958.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:IsType(TYPE_MONSTER)
end
function c10032958.damtg(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 dam=bc:GetAttack()
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 c10032958.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
--オオアリクイクイアリ
function c13250922.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--spsummon proc
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(c13250922.spcon)
e2:SetOperation(c13250922.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(83021423,0))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c13250922.descost)
e3:SetTarget(c13250922.destg)
e3:SetOperation(c13250922.desop)
c:RegisterEffect(e3)
end
function c13250922.spfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c13250922.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13250922.spfilter,c:GetControler(),LOCATION_ONFIELD,0,2,nil)
end
function c13250922.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c13250922.spfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c13250922.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c13250922.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c13250922.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c13250922.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13250922.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c13250922.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c13250922.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--増幅する悪意
function c14255590.initial_effect(c)
--discard deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14255590,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCountLimit(1)
e1:SetCondition(c14255590.discon)
e1:SetTarget(c14255590.distg)
e1:SetOperation(c14255590.disop)
c:RegisterEffect(e1)
end
function c14255590.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c14255590.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c14255590.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,14255590)
if ct>0 then
Duel.DiscardDeck(1-tp,ct,REASON_EFFECT)
end
end
--封魔の伝承者
function c15595052.initial_effect(c)
--to defence
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15595052,0))
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c15595052.ancop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c15595052.ancop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,15595052)
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,562)
local att=Duel.AnnounceAttribute(tp,ct,0xffff)
e:GetHandler():SetHint(CHINT_ATTRIBUTE,att)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15595052,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(c15595052.destg)
e1:SetOperation(c15595052.desop)
e1:SetLabel(att)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
function c15595052.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=Duel.GetAttackTarget()
if chk==0 then return c==Duel.GetAttacker() and bc and bc:IsFaceup() and bc:IsAttribute(e:GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function c15595052.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=Duel.GetAttackTarget()
if bc:IsRelateToBattle() and bc:IsFaceup() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
...@@ -12,9 +12,7 @@ function c17313545.initial_effect(c) ...@@ -12,9 +12,7 @@ function c17313545.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17313545,0)) e2:SetDescription(aux.Stringid(17313545,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_BATTLE_END)
e2:SetCountLimit(1)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c17313545.atcon) e2:SetCondition(c17313545.atcon)
e2:SetOperation(c17313545.atop) e2:SetOperation(c17313545.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -23,8 +21,10 @@ function c17313545.distg(e,c) ...@@ -23,8 +21,10 @@ function c17313545.distg(e,c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_EFFECT) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_EFFECT)
end end
function c17313545.atcon(e,tp,eg,ep,ev,re,r,rp) function c17313545.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattleTarget():IsAttribute(ATTRIBUTE_LIGHT) local c=e:GetHandler()
and e:GetHandler():IsChainAttackable() local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
and bc:IsAttribute(ATTRIBUTE_LIGHT)
end end
function c17313545.atop(e,tp,eg,ep,ev,re,r,rp) function c17313545.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -24,7 +24,6 @@ function c18013090.initial_effect(c) ...@@ -24,7 +24,6 @@ function c18013090.initial_effect(c)
e3:SetCategory(CATEGORY_POSITION) e3:SetCategory(CATEGORY_POSITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCountLimit(1)
e3:SetCode(EVENT_BATTLE_END) e3:SetCode(EVENT_BATTLE_END)
e3:SetCondition(c18013090.cacon) e3:SetCondition(c18013090.cacon)
e3:SetTarget(c18013090.catg) e3:SetTarget(c18013090.catg)
...@@ -54,9 +53,9 @@ function c18013090.atop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,9 +53,9 @@ function c18013090.atop2(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c18013090.cacon(e,tp,eg,ep,ev,re,r,rp) function c18013090.cacon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local c=e:GetHandler()
local d=Duel.GetAttackTarget() local bc=c:GetBattleTarget()
return a==e:GetHandler() and d and d:IsStatus(STATUS_BATTLE_DESTROYED) return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
end end
function c18013090.filter(c) function c18013090.filter(c)
return c:IsFaceup() and c:IsDefencePos() and not c:IsStatus(STATUS_BATTLE_DESTROYED) return c:IsFaceup() and c:IsDefencePos() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
......
--ヘル·ブラスト
function c18271561.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c18271561.condition)
e1:SetTarget(c18271561.target)
e1:SetOperation(c18271561.operation)
c:RegisterEffect(e1)
end
function c18271561.filter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY)
end
function c18271561.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return eg:IsExists(c18271561.filter,1,nil,tp)
end
function c18271561.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local dg=g:GetMinGroup(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0)
end
function c18271561.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
local dg=g:GetMinGroup(Card.GetAttack)
if dg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=dg:Select(tp,1,1,nil)
end
local atk=dg:GetFirst():GetAttack()/2
if Duel.Destroy(dg,REASON_EFFECT)>0 then
Duel.Damage(tp,atk,REASON_EFFECT)
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
--メカニカル·ハウンド
function c22512237.initial_effect(c)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(c22512237.aclimit)
e1:SetCondition(c22512237.condition)
c:RegisterEffect(e1)
end
function c22512237.condition(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0
end
function c22512237.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end
...@@ -21,7 +21,7 @@ function c22624373.initial_effect(c) ...@@ -21,7 +21,7 @@ function c22624373.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_REPEAT) e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c22624373.discon) e2:SetCondition(c22624373.discon)
e2:SetCost(c22624373.discost) e2:SetTarget(c22624373.distg)
e2:SetOperation(c22624373.disop) e2:SetOperation(c22624373.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -55,7 +55,7 @@ end ...@@ -55,7 +55,7 @@ end
function c22624373.discon(e,tp,eg,ep,ev,re,r,rp) function c22624373.discon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() return tp==Duel.GetTurnPlayer()
end end
function c22624373.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c22624373.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end end
......
--エレメント·デビル
function c23118924.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_END)
e1:SetCondition(c23118924.discon)
e1:SetOperation(c23118924.disop)
c:RegisterEffect(e1)
--chain attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23118924,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_END)
e2:SetCondition(c23118924.atcon)
e2:SetOperation(c23118924.atop)
c:RegisterEffect(e2)
end
function c23118924.filter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
end
function c23118924.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsExistingMatchingCard(c23118924.filter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_EARTH)
end
function c23118924.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e2)
end
function c23118924.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
and not c:IsDisabled() and Duel.IsExistingMatchingCard(c23118924.filter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WIND)
end
function c23118924.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
--炎獄魔人ヘル·バーナー
function c23309606.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23309606,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(c23309606.otcon)
e1:SetOperation(c23309606.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c23309606.val)
c:RegisterEffect(e2)
end
function c23309606.otcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
hg:RemoveCard(c)
local g=Duel.GetTributeGroup(c)
return hg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and g:IsExists(Card.IsAttackAbove,1,nil,2000)
and hg:FilterCount(Card.IsAbleToGraveAsCost,nil)==hg:GetCount()
end
function c23309606.otop(e,tp,eg,ep,ev,re,r,rp,c)
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
hg:RemoveCard(c)
Duel.SendtoGrave(hg,REASON_COST+REASON_DISCARD)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsAttackAbove,1,1,nil,2000)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c23309606.val(e,c)
local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*-500+500+Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*200
end
--融合禁止エリア
function c27581098.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetTarget(c27581098.splimit)
c:RegisterEffect(e2)
end
function c27581098.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
--ふるい落とし
function c28604635.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c28604635.cost)
e1:SetTarget(c28604635.target)
e1:SetOperation(c28604635.activate)
c:RegisterEffect(e1)
end
function c28604635.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 c28604635.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:GetLevel()==3 and c:IsDestructable()
end
function c28604635.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c28604635.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--スーパージュニア対決!
function c29590905.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c29590905.condition)
e1:SetTarget(c29590905.target)
e1:SetOperation(c29590905.activate)
c:RegisterEffect(e1)
end
function c29590905.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():IsControler(1-tp)
end
function c29590905.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_DEFENCE) end
end
function c29590905.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK)
local g2=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEUP_DEFENCE)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
local ga=g1:GetMinGroup(Card.GetAttack)
local gd=g2:GetMinGroup(Card.GetDefence)
if ga:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(29590905,0))
ga=ga:Select(tp,1,1,nil)
end
if gd:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(29590905,1))
gd=gd:Select(tp,1,1,nil)
end
Duel.NegateAttack()
Duel.CalculateDamage(ga:GetFirst(),gd:GetFirst())
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
--エレメント·ドラゴン
function c30314994.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetCondition(c30314994.atkcon)
c:RegisterEffect(e1)
--chain attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30314994,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_END)
e2:SetCondition(c30314994.atcon)
e2:SetOperation(c30314994.atop)
c:RegisterEffect(e2)
end
function c30314994.filter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
end
function c30314994.atkcon(e)
return Duel.IsExistingMatchingCard(c30314994.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE)
end
function c30314994.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
and not c:IsDisabled() and Duel.IsExistingMatchingCard(c30314994.filter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WIND)
end
function c30314994.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
--ブランチ
function c30548775.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30548775,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c30548775.condition)
e2:SetTarget(c30548775.target)
e2:SetOperation(c30548775.operation)
c:RegisterEffect(e2)
end
function c30548775.filter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsType(TYPE_FUSION)
and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c30548775.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return eg:IsExists(c30548775.filter,1,nil)
end
function c30548775.spfilter(c,eg)
return c:IsReason(REASON_FUSION) and eg:IsContains(c:GetReasonCard())
end
function c30548775.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocaion(LOCATION_GRAVE) and c30548775.spfilter(chkc,eg) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c30548775.spfilter,tp,LOCATION_GRAVE,0,1,nil,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c30548775.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c30548775.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--オプションハンター
function c33248692.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c33248692.condition)
e1:SetTarget(c33248692.target)
e1:SetOperation(c33248692.operation)
c:RegisterEffect(e1)
end
function c33248692.filter(c,tp)
return c:GetPreviousControler()==tp
end
function c33248692.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return eg:IsExists(c33248692.filter,1,nil,tp)
end
function c33248692.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=eg:Filter(c33248692.filter,nil,tp):GetFirst()
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(tc:GetBaseAttack())
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,tc:GetBaseAttack())
end
function c33248692.operation(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 c33875961.initial_effect(c)
c:EnableCounterPermit(0x3027)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33875961,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c33875961.addccon)
e1:SetTarget(c33875961.addct)
e1:SetOperation(c33875961.addc)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33875961,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c33875961.descost)
e2:SetTarget(c33875961.destg)
e2:SetOperation(c33875961.desop)
c:RegisterEffect(e2)
end
function c33875961.addccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():IsDefencePos()
end
function c33875961.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3027)
end
function c33875961.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x3027,1)
end
end
function c33875961.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetCounter(0x3027)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,ct,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,ct,ct,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c33875961.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c33875961.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c33875961.filter(chkc) end
local ct=e:GetHandler():GetCounter(0x3027)
if chk==0 then return Duel.IsExistingTarget(c33875961.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c33875961.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
end
function c33875961.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g:FilterCount(Card.IsRelateToEffect,nil,e)==g:GetCount() then
Duel.Destroy(g,REASON_EFFECT)
end
local ct=e:GetHandler():GetCounter(0x3027)
e:GetHandler():RemoveCounter(tp,0x3027,ct,REASON_EFFECT)
end
--ジェネレーション·チェンジ
function c34460239.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c34460239.target)
e1:SetOperation(c34460239.activate)
c:RegisterEffect(e1)
end
function c34460239.filter(c,tp)
return c:IsFaceup() and c:IsDestructable()
and Duel.IsExistingMatchingCard(c34460239.filter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c34460239.filter2(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c34460239.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c34460239.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c34460239.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c34460239.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c34460239.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
local hc=Duel.GetFirstMatchingCard(c34460239.filter2,tp,LOCATION_DECK,0,nil,tc:GetCode())
if hc then
Duel.SendtoHand(hc,nil,REAOSN_EFFECT)
Duel.ConfirmCards(1-tp,hc)
end
end
end
...@@ -16,9 +16,7 @@ function c35638627.initial_effect(c) ...@@ -16,9 +16,7 @@ function c35638627.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(35638627,0)) e3:SetDescription(aux.Stringid(35638627,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_BATTLE_END)
e3:SetCountLimit(1)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c35638627.atcon) e3:SetCondition(c35638627.atcon)
e3:SetOperation(c35638627.atop) e3:SetOperation(c35638627.atop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -41,7 +39,9 @@ function c35638627.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +39,9 @@ function c35638627.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c35638627.atcon(e,tp,eg,ep,ev,re,r,rp) function c35638627.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsChainAttackable() local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
end end
function c35638627.atop(e,tp,eg,ep,ev,re,r,rp) function c35638627.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
--静寂虫
function c40867519.initial_effect(c)
--to defence
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40867519,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c40867519.postg)
e1:SetOperation(c40867519.posop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e3:SetTarget(c40867519.distarget)
c:RegisterEffect(e3)
--disable effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c40867519.disop)
c:RegisterEffect(e4)
--disable trap monster
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(c40867519.distarget)
c:RegisterEffect(e5)
end
function c40867519.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c40867519.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
end
function c40867519.distarget(e,c)
return c~=e:GetHandler() and c:IsType(TYPE_CONTINUOUS)
end
function c40867519.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_CONTINUOUS) then
Duel.NegateEffect(ev)
end
end
--グラスファントム
function c41249545.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c41249545.atkup)
c:RegisterEffect(e1)
end
function c41249545.atkup(e,c)
return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,41249545)*500
end
...@@ -5,16 +5,15 @@ function c46427957.initial_effect(c) ...@@ -5,16 +5,15 @@ function c46427957.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46427957,0)) e1:SetDescription(aux.Stringid(46427957,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_BATTLE_END)
e1:SetCountLimit(1)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c46427957.atcon) e1:SetCondition(c46427957.atcon)
e1:SetOperation(c46427957.atop) e1:SetOperation(c46427957.atop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c46427957.atcon(e,tp,eg,ep,ev,re,r,rp) function c46427957.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsChainAttackable() local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
end end
function c46427957.atop(e,tp,eg,ep,ev,re,r,rp) function c46427957.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
--ヘル·アライアンス
function c46910446.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(c46910446.target)
e1:SetOperation(c46910446.operation)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c46910446.value)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c46910446.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 c46910446.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 c46910446.filter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c46910446.value(e,c)
return Duel.GetMatchingGroupCount(c46910446.filter,0,LOCATION_MZONE,LOCATION_MZONE,c,c:GetCode())*800
end
--記憶破壊者
function c48700891.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(48700891,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c48700891.condition)
e1:SetTarget(c48700891.target)
e1:SetOperation(c48700891.operation)
c:RegisterEffect(e1)
end
function c48700891.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil
end
function c48700891.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct*100)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*100)
end
function c48700891.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,ct*100,REASON_EFFECT)
end
--地獄戦士
function c50916353.initial_effect(c)
--reg
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_AVAILABLE_BD)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c50916353.regcon)
e1:SetOperation(c50916353.regop)
c:RegisterEffect(e1)
end
function c50916353.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==tp and c:GetBattleTarget()==eg:GetFirst()
end
function c50916353.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50916353,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetTarget(c50916353.damtg)
e1:SetOperation(c50916353.damop)
e1:SetLabel(ev)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
end
function c50916353.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel())
end
function c50916353.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
--異次元への案内人
function c52702748.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(52702748,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c52702748.ctltg)
e1:SetOperation(c52702748.ctlop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(52702748,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetCountLimit(1)
e2:SetTarget(c52702748.rmtg)
e2:SetOperation(c52702748.rmop)
c:RegisterEffect(e2)
end
function c52702748.ctltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end
function c52702748.ctlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not Duel.GetControl(c,1-tp) and not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c52702748.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil,1-tp) end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(1-tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil,1-tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c52702748.rmop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--レベル制限A地区
function c54976796.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Pos Change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_POSITION)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c54976796.target)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e2)
end
function c54976796.target(e,c)
return c:IsLevelBelow(3) and c:IsFaceup()
end
--サイバネティック·マジシャン
function c59023523.initial_effect(c)
--atk change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(59023523,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c59023523.cost)
e1:SetTarget(c59023523.target)
e1:SetOperation(c59023523.operation)
c:RegisterEffect(e1)
end
function c59023523.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c59023523.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c59023523.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(2000)
tc:RegisterEffect(e1)
end
end
--誤作動
function c6137095.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c6137095.condition)
e1:SetCost(c6137095.cost)
e1:SetTarget(c6137095.target)
e1:SetOperation(c6137095.activate)
c:RegisterEffect(e1)
end
function c6137095.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c6137095.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 c6137095.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
return re:GetHandler():IsCanTurnSet()
else return true end
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
end
end
function c6137095.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then
if rc:IsStatus(STATUS_ACT_FROM_HAND) then
rc:CancelToGrave()
Duel.SendtoHand(rc,nil,REASON_EFFECT)
else
if rc:IsCanTurnSet() then
rc:CancelToGrave()
Duel.ChangePosition(rc,POS_FACEDOWN)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
end
--エーリアン·ハンター --エーリアン·ハンター
function c62315111.initial_effect(c) function c62315111.initial_effect(c)
--check --chain attack
e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetDescription(aux.Stringid(62315111,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_END) e1:SetCode(EVENT_BATTLE_END)
e1:SetOperation(c62315111.checkop) e1:SetCondition(c62315111.atcon)
e1:SetOperation(c62315111.atop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--chain attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62315111,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c62315111.atcon)
e2:SetOperation(c62315111.atop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c62315111.checkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if t and t~=c and t:GetCounter(0xe)>0 then
e:SetLabel(1)
else e:SetLabel(0) end
end end
function c62315111.atcon(e,tp,eg,ep,ev,re,r,rp) function c62315111.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()==1 and e:GetHandler():IsChainAttackable() local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
and bc:GetCounter(0xe)>0
end end
function c62315111.atop(e,tp,eg,ep,ev,re,r,rp) function c62315111.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
--エレメント·マジシャン
function c65260293.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
e1:SetCondition(c65260293.ctlcon)
c:RegisterEffect(e1)
--chain attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65260293,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_END)
e2:SetCondition(c65260293.atcon)
e2:SetOperation(c65260293.atop)
c:RegisterEffect(e2)
end
function c65260293.filter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
end
function c65260293.ctlcon(e)
return Duel.IsExistingMatchingCard(c65260293.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER)
end
function c65260293.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
and not c:IsDisabled() and Duel.IsExistingMatchingCard(c65260293.filter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WIND)
end
function c65260293.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
--エレメント·ソルジャー
function c66712593.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
e1:SetCondition(c66712593.ctlcon)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_END)
e2:SetCondition(c66712593.discon)
e2:SetOperation(c66712593.disop)
c:RegisterEffect(e2)
end
function c66712593.filter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
end
function c66712593.ctlcon(e)
return Duel.IsExistingMatchingCard(c66712593.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER)
end
function c66712593.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsExistingMatchingCard(c66712593.filter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_EARTH)
end
function c66712593.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e2)
end
--成功確率0%
function c6859683.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c6859683.target)
e1:SetOperation(c6859683.operation)
c:RegisterEffect(e1)
end
function c6859683.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>=2 end
end
function c6859683.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_EXTRA,0,nil,TYPE_FUSION)
local rg=g:RandomSelect(tp,2)
Duel.SendtoGrave(rg,REASON_EFFECT)
if rg:GetCount()<2 then
local cg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,cg)
end
end
...@@ -3,22 +3,20 @@ function c69069911.initial_effect(c) ...@@ -3,22 +3,20 @@ function c69069911.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,4),2) aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,4),2)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --chain attack
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69069911,0)) e1:SetDescription(aux.Stringid(69069911,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c69069911.atcon) e1:SetCondition(c69069911.atcon)
e1:SetCost(c69069911.atcost) e1:SetCost(c69069911.atcost)
e1:SetOperation(c69069911.atop) e1:SetOperation(c69069911.atop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c69069911.atcon(e,tp,eg,ep,ev,re,r,rp) function c69069911.atcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local c=e:GetHandler()
local rc=tc:GetReasonCard() local bc=tc:GetBattleTarget()
return eg:GetCount()==1 and rc==e:GetHandler() and rc:IsChainAttackable() return bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER) and c:IsChainAttackable()
and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE)
end end
function c69069911.atcost(e,tp,eg,ep,ev,re,r,rp,chk) function c69069911.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
--ナノブレイカー
function c70948327.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70948327,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(c70948327.destg)
e1:SetOperation(c70948327.desop)
c:RegisterEffect(e1)
end
function c70948327.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler()
and d~=nil and d:IsFaceup() and d:IsLevelBelow(3) and d:IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end
function c70948327.desop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d:IsRelateToBattle() and d:IsFaceup() and d:IsLevelBelow(3) then
Duel.Destroy(d,REASON_EFFECT)
end
end
--ヘル·ポリマー
function c72287557.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c72287557.condition)
e1:SetCost(c72287557.cost)
e1:SetTarget(c72287557.target)
e1:SetOperation(c72287557.activate)
c:RegisterEffect(e1)
end
function c72287557.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:IsControler(1-tp) and bit.band(tc:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c72287557.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c72287557.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return eg:GetFirst():IsCanBeEffectTarget(e) and eg:GetFirst():IsControlerCanBeChanged() end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,eg,1,0,0)
end
function c72287557.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,0,0) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
...@@ -27,9 +27,7 @@ function c72989439.initial_effect(c) ...@@ -27,9 +27,7 @@ function c72989439.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(72989439,2)) e3:SetDescription(aux.Stringid(72989439,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_BATTLE_END)
e3:SetCountLimit(1)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c72989439.atcon) e3:SetCondition(c72989439.atcon)
e3:SetOperation(c72989439.atop) e3:SetOperation(c72989439.atop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -78,7 +76,8 @@ function c72989439.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +76,8 @@ function c72989439.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
function c72989439.atcon(e,tp,eg,ep,ev,re,r,rp) function c72989439.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(72989439)==0 and c:IsChainAttackable() local bc=c:GetBattleTarget()
return bc and c:GetFlagEffect(72989439)==0 and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
end end
function c72989439.atop(e,tp,eg,ep,ev,re,r,rp) function c72989439.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
--サンドモス
function c73648243.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(73648243,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c73648243.spcon)
e1:SetTarget(c73648243.sptg)
e1:SetOperation(c73648243.spop)
c:RegisterEffect(e1)
end
function c73648243.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(c:GetReason(),0x41)==0x41 and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEDOWN_DEFENCE)
end
function c73648243.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,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c73648243.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENCE)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
...@@ -13,9 +13,7 @@ function c80367387.initial_effect(c) ...@@ -13,9 +13,7 @@ function c80367387.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(80367387,3)) e2:SetDescription(aux.Stringid(80367387,3))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_BATTLE_END)
e2:SetCountLimit(1)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c80367387.atcon) e2:SetCondition(c80367387.atcon)
e2:SetOperation(c80367387.atop) e2:SetOperation(c80367387.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -55,7 +53,9 @@ function c80367387.ccost(e,tp) ...@@ -55,7 +53,9 @@ function c80367387.ccost(e,tp)
end end
end end
function c80367387.atcon(e,tp,eg,ep,ev,re,r,rp) function c80367387.atcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsChainAttackable() local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsChainAttackable()
end end
function c80367387.atop(e,tp,eg,ep,ev,re,r,rp) function c80367387.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack() Duel.ChainAttack()
......
...@@ -7,8 +7,6 @@ function c86137485.initial_effect(c) ...@@ -7,8 +7,6 @@ function c86137485.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86137485,0)) e1:SetDescription(aux.Stringid(86137485,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c86137485.atcon1) e1:SetCondition(c86137485.atcon1)
e1:SetOperation(c86137485.atop1) e1:SetOperation(c86137485.atop1)
...@@ -16,16 +14,16 @@ function c86137485.initial_effect(c) ...@@ -16,16 +14,16 @@ function c86137485.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86137485,0)) e2:SetDescription(aux.Stringid(86137485,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c86137485.atcon2) e2:SetCondition(c86137485.atcon2)
e2:SetOperation(c86137485.atop2) e2:SetOperation(c86137485.atop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c86137485.atcon1(e,tp,eg,ep,ev,re,r,rp) function c86137485.atcon1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget() local c=e:GetHandler()
return Duel.GetTurnPlayer()==tp and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) and e:GetHandler():IsChainAttackable() local tc=c:GetBattleTarget()
return Duel.GetTurnPlayer()==tp and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
and tc:IsType(TYPE_MONSTER) and c:IsChainAttackable()
end end
function c86137485.atop1(e,tp,eg,ep,ev,re,r,rp) function c86137485.atop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -40,7 +38,7 @@ function c86137485.atop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +38,7 @@ function c86137485.atop1(e,tp,eg,ep,ev,re,r,rp)
end end
function c86137485.atcon2(e,tp,eg,ep,ev,re,r,rp) function c86137485.atcon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
return Duel.GetTurnPlayer()~=tp and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) return Duel.GetTurnPlayer()~=tp and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) and tc:IsType(TYPE_MONSTER)
end end
function c86137485.atop2(e,tp,eg,ep,ev,re,r,rp) function c86137485.atop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--寄生体ダニー
function c87978805.initial_effect(c)
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c87978805.val)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENCE)
c:RegisterEffect(e2)
end
function c87978805.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN)*500
end
--アームド·チェンジャー
function c90374791.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:SetCost(c90374791.cost)
e1:SetTarget(c90374791.target)
e1:SetOperation(c90374791.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(1)
c:RegisterEffect(e2)
--salvage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(90374791,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(c90374791.thcon)
e3:SetTarget(c90374791.thtg)
e3:SetOperation(c90374791.thop)
c:RegisterEffect(e3)
end
function c90374791.cfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c90374791.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90374791.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c90374791.cfilter,1,1,REASON_COST)
end
function c90374791.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 c90374791.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 c90374791.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler():GetEquipTarget()
end
function c90374791.filter(c,atk)
return c:IsType(TYPE_MONSTER) and c:IsAttackBelow(atk) and c:IsAbleToHand()
end
function c90374791.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local eatk=e:GetHandler():GetEquipTarget():GetAttack()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90374791.filter(chkc,eatk) end
if chk==0 then return Duel.IsExistingTarget(c90374791.filter,tp,LOCATION_GRAVE,0,1,nil,eatk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c90374791.filter,tp,LOCATION_GRAVE,0,1,1,nil,eatk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c90374791.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--ゲットライド!
function c91597389.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c91597389.target)
e1:SetOperation(c91597389.operation)
c:RegisterEffect(e1)
end
function c91597389.filter(c,tp)
return c:IsType(TYPE_UNION) and Duel.IsExistingMatchingCard(c91597389.filter2,tp,LOCATION_MZONE,0,1,nil,c)
end
function c91597389.filter2(c,eqc)
return c:IsFaceup() and c:GetUnionCount()==0 and eqc:CheckEquipTarget(c)
end
function c91597389.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c91597389.filter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>(e:GetHandler():IsLocation(LOCATION_SZONE) and 0 or 1)
and Duel.IsExistingTarget(c91597389.filter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c91597389.filter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c91597389.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c91597389.filter2,tp,LOCATION_MZONE,0,1,1,nil,tc)
if g:GetCount()>0 then
Duel.Equip(tp,tc,g:GetFirst())
tc:SetStatus(STATUS_UNION,true)
end
end
end
--二者一両損
function c92219931.initial_effect(c)
--discard deck
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c92219931.discost)
e1:SetOperation(c92219931.disop)
c:RegisterEffect(e1)
end
function c92219931.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.IsPlayerCanDiscardDeck(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,1)
end
function c92219931.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(0,1,REASON_EFFECT)
Duel.DiscardDeck(1,1,REASON_EFFECT)
end
--エレメント·ザウルス
function c92755808.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetCondition(c92755808.atkcon)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_END)
e2:SetCondition(c92755808.discon)
e2:SetOperation(c92755808.disop)
c:RegisterEffect(e2)
end
function c92755808.filter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
end
function c92755808.atkcon(e)
return Duel.IsExistingMatchingCard(c92755808.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE)
end
function c92755808.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsExistingMatchingCard(c92755808.filter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_EARTH)
end
function c92755808.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e2)
end
\ No newline at end of file
--幻魔の殉教者
function c93224848.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c93224848.condition)
e1:SetCost(c93224848.cost)
e1:SetTarget(c93224848.target)
e1:SetOperation(c93224848.activate)
c:RegisterEffect(e1)
end
function c93224848.filter(c)
local code=c:GetCode()
return c:IsFaceup() and (code==6007213 or code==32491822)
end
function c93224848.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=2
and Duel.IsExistingMatchingCard(c93224848.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c93224848.cfilter(c)
return not c:IsAbleToGraveAsCost()
end
function c93224848.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsExistingMatchingCard(c93224848.cfilter,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.SendtoGrave(g,REASON_COST)
end
function c93224848.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsPlayerCanSpecialSummonMonster(tp,93224849,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0)
end
function c93224848.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsPlayerCanSpecialSummonMonster(tp,93224849,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then
for i=1,3 do
local token=Duel.CreateToken(tp,93224849)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
Duel.SpecialSummonComplete()
end
end
--磁力の召喚円 LV2
function c94940436.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c94940436.target)
e1:SetOperation(c94940436.activate)
c:RegisterEffect(e1)
end
function c94940436.filter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c94940436.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c94940436.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c94940436.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c94940436.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--サイバネティック·サイクロプス
function c96428622.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetCondition(c96428622.atkcon)
c:RegisterEffect(e1)
end
function c96428622.atkcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0
end
--エレメント·ヴァルキリー
function c97623219.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetCondition(c97623219.atkcon)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
e2:SetCondition(c97623219.ctlcon)
c:RegisterEffect(e2)
end
function c97623219.filter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
end
function c97623219.atkcon(e)
return Duel.IsExistingMatchingCard(c97623219.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE)
end
function c97623219.ctlcon(e)
return Duel.IsExistingMatchingCard(c97623219.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER)
end
--おジャマッスル
function c98259197.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c98259197.target)
e1:SetOperation(c98259197.activate)
c:RegisterEffect(e1)
end
function c98259197.filter(c)
return c:IsFaceup() and c:IsCode(90140980)
and Duel.IsExistingMatchingCard(c98259197.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c98259197.filter2(c)
return c:IsFaceup() and c:IsSetCard(0xf)
end
function c98259197.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98259197.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c98259197.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c98259197.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local dg=Duel.GetMatchingGroup(c98259197.filter2,0,LOCATION_MZONE,LOCATION_MZONE,g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c98259197.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local dg=Duel.GetMatchingGroup(c98259197.filter2,0,LOCATION_MZONE,LOCATION_MZONE,tc)
local ct=Duel.Destroy(dg,REASON_EFFECT)
if ct>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
...@@ -138,6 +138,8 @@ STATUS_INITIALIZING =0x400000 -- ...@@ -138,6 +138,8 @@ STATUS_INITIALIZING =0x400000 --
STATUS_ACTIVATED =0x800000 -- STATUS_ACTIVATED =0x800000 --
STATUS_JUST_POS =0x1000000 -- STATUS_JUST_POS =0x1000000 --
STATUS_CONTINUOUS_POS =0x2000000 -- STATUS_CONTINUOUS_POS =0x2000000 --
STATUS_IS_PUBLIC =0x4000000 --
STATUS_ACT_FROM_HAND =0x8000000 --
--Counter --Counter
COUNTER_NEED_PERMIT =0x1000 COUNTER_NEED_PERMIT =0x1000
COUNTER_NEED_ENABLE =0x2000 COUNTER_NEED_ENABLE =0x2000
......
...@@ -407,3 +407,4 @@ ...@@ -407,3 +407,4 @@
!counter 0x25 年代记指示物 !counter 0x25 年代记指示物
!counter 0x26 指示物(金属射手) !counter 0x26 指示物(金属射手)
!counter 0x26 指示物(死亡蚊) !counter 0x26 指示物(死亡蚊)
!counter 0x3027 指示物(暗黑投射手)
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