Commit eb33893f authored by argon.sun's avatar argon.sun

new

parent 267690d0
......@@ -396,6 +396,7 @@ public:
//operations
int32 negate_chain(uint8 chaincount);
int32 disable_chain(uint8 chaincount);
int32 negate_related_chain(card* pcard);
void change_chain_effect(uint8 chaincount, int32 replace_op);
void change_target(uint8 chaincount, group* targets);
void change_target_player(uint8 chaincount, uint8 playerid);
......
......@@ -348,8 +348,9 @@ static const struct luaL_Reg duellib[] = {
{ "ChangeTargetParam", scriptlib::duel_change_target_param },
{ "BreakEffect", scriptlib::duel_break_effect },
{ "ChangeChainOperation", scriptlib::duel_change_effect },
{ "NegateActivation", scriptlib::duel_disable_activate },
{ "NegateEffect", scriptlib::duel_disable_effect },
{ "NegateActivation", scriptlib::duel_negate_activate },
{ "NegateEffect", scriptlib::duel_negate_effect },
{ "NegateRelatedChain", scriptlib::duel_negate_related_chain },
{ "NegateSummon", scriptlib::duel_disable_summon },
{ "IncreaseSummonedCount", scriptlib::duel_increase_summon_count },
{ "CheckSummonedCount", scriptlib::duel_check_summon_count },
......
......@@ -1120,20 +1120,28 @@ int32 scriptlib::duel_change_effect(lua_State *L) {
pduel->game_field->change_chain_effect(count, pf);
return 0;
}
int32 scriptlib::duel_disable_activate(lua_State *L) {
int32 scriptlib::duel_negate_activate(lua_State *L) {
check_param_count(L, 1);
uint32 c = lua_tointeger(L, 1);
duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->negate_chain(c));
return 1;
}
int32 scriptlib::duel_disable_effect(lua_State *L) {
int32 scriptlib::duel_negate_effect(lua_State *L) {
check_param_count(L, 1);
uint32 c = lua_tointeger(L, 1);
duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->disable_chain(c));
return 1;
}
int32 scriptlib::duel_negate_related_chain(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**)lua_touserdata(L, 1);
duel* pduel = pcard->pduel;
lua_pushboolean(L, pduel->game_field->negate_related_chain(pcard));
return 1;
}
int32 scriptlib::duel_disable_summon(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
......
......@@ -54,6 +54,21 @@ int32 field::disable_chain(uint8 chaincount) {
}
return FALSE;
}
int32 field::negate_related_chain(card* pcard) {
for(int32 i = 0; i < core.current_chain.size(); ++i) {
chain& pchain = core.current_chain[i];
if(pchain.triggering_effect->handler == pcard && !(pchain.flag & CHAIN_DISABLE_EFFECT) && is_chain_disablable(pchain.chain_count)
&& pchain.triggering_effect->handler->is_affect_by_effect(core.reason_effect)) {
pchain.flag |= CHAIN_DISABLE_EFFECT | CHAIN_NEGATED;
pchain.disable_reason = core.reason_effect;
pchain.disable_player = core.reason_player;
pduel->write_buffer8(MSG_CHAIN_DISABLED);
pduel->write_buffer8(i);
return TRUE;
}
}
return FALSE;
}
void field::change_chain_effect(uint8 chaincount, int32 rep_op) {
if(core.current_chain.size() == 0)
return;
......@@ -213,8 +228,7 @@ void field::destroy(card* target, effect* reason_effect, uint32 reason, uint32 r
destroy(&tset, reason_effect, reason, reason_player, playerid, destination, sequence);
}
void field::release(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player) {
card_set::iterator cit;
for(cit = targets->begin(); cit != targets->end(); ++cit) {
for(auto cit = targets->begin(); cit != targets->end(); ++cit) {
card* pcard = *cit;
pcard->temp.reason = pcard->current.reason;
pcard->temp.reason_effect = pcard->current.reason_effect;
......@@ -235,11 +249,10 @@ void field::release(card* target, effect* reason_effect, uint32 reason, uint32 r
release(&tset, reason_effect, reason, reason_player);
}
void field::send_to(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence, uint32 position) {
card_set::iterator cit;
if(!(destination & (LOCATION_HAND + LOCATION_DECK + LOCATION_GRAVE + LOCATION_REMOVED)))
return;
uint32 p, pos;
for(cit = targets->begin(); cit != targets->end(); ++cit) {
for(auto cit = targets->begin(); cit != targets->end(); ++cit) {
card* pcard = *cit;
pcard->temp.reason = pcard->current.reason;
pcard->temp.reason_effect = pcard->current.reason_effect;
......@@ -279,8 +292,7 @@ void field::change_position(card_set* targets, effect* reason_effect, uint32 rea
group* ng = pduel->new_group();
ng->container = *targets;
ng->is_readonly = TRUE;
card_set::iterator cit;
for(cit = targets->begin(); cit != targets->end(); ++cit) {
for(auto cit = targets->begin(); cit != targets->end(); ++cit) {
card* pcard = *cit;
if(pcard->current.position == POS_FACEUP_ATTACK) pcard->operation_param = au;
else if(pcard->current.position == POS_FACEDOWN_DEFENCE) pcard->operation_param = dd;
......
......@@ -344,8 +344,9 @@ public:
static int32 duel_change_target_param(lua_State *L);
static int32 duel_break_effect(lua_State *L);
static int32 duel_change_effect(lua_State *L);
static int32 duel_disable_activate(lua_State *L);
static int32 duel_disable_effect(lua_State *L);
static int32 duel_negate_activate(lua_State *L);
static int32 duel_negate_effect(lua_State *L);
static int32 duel_negate_related_chain(lua_State *L);
static int32 duel_disable_summon(lua_State *L);
static int32 duel_increase_summon_count(lua_State *L);
static int32 duel_check_summon_count(lua_State *L);
......
--ウェポンチェンジ
function c10035717.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10035717,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c10035717.adcon)
e2:SetCost(c10035717.adcost)
e2:SetTarget(c10035717.adtg)
e2:SetOperation(c10035717.adop)
c:RegisterEffect(e2)
end
function c10035717.adcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c10035717.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,700) end
Duel.PayLPCost(tp,700)
end
function c10035717.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_WARRIOR)
end
function c10035717.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c10035717.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10035717.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c10035717.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c10035717.adop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetAttack()
local def=tc:GetDefence()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(def)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENCE_FINAL)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
end
end
......@@ -36,18 +36,7 @@ function c1005587.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetOperation(c1005587.disop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc)
Duel.Destroy(tc,REASON_EFFECT)
end
function c1005587.disop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler()==e:GetLabelObject() then
Duel.NegateEffect(ev)
end
end
--ミクロ光線
function c18190572.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c18190572.condition)
e1:SetTarget(c18190572.target)
e1:SetOperation(c18190572.activate)
c:RegisterEffect(e1)
end
function c18190572.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c18190572.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_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c18190572.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENCE_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(0)
tc:RegisterEffect(e1)
end
end
--罠封印の呪符
function c19312169.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c19312169.actcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c19312169.descon)
c:RegisterEffect(e2)
--cannot trigger
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0xa,0xa)
e3:SetTarget(c19312169.distg)
c:RegisterEffect(e3)
--disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e4:SetTarget(c19312169.distg)
c:RegisterEffect(e4)
--disable effect
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_SZONE)
e5:SetOperation(c19312169.disop)
c:RegisterEffect(e5)
--disable trap monster
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(c19312169.distg)
c:RegisterEffect(e6)
end
function c19312169.filter(c)
return c:IsFaceup() and c:IsCode(2468169)
end
function c19312169.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c19312169.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c19312169.descon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c19312169.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c19312169.distg(e,c)
return c:IsType(TYPE_TRAP)
end
function c19312169.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_TRAP) then
Duel.NegateEffect(ev)
end
end
--円盤闘士
function c19612721.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19612721,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetTarget(c19612721.destg)
e1:SetOperation(c19612721.desop)
c:RegisterEffect(e1)
end
function c19612721.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local t=Duel.GetAttackTarget()
if chk==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil and t:IsDefencePos() and t:IsDefenceAbove(2000) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,t,1,0,0)
end
function c19612721.desop(e,tp,eg,ep,ev,re,r,rp)
local t=Duel.GetAttackTarget()
if t~=nil and t:IsRelateToBattle() and not t:IsAttackPos() then
Duel.Destroy(t,REASON_EFFECT)
end
end
......@@ -62,5 +62,9 @@ function c20644748.mvalue(e,fp,rp,r)
return 5-Duel.GetFieldGroupCount(fp,LOCATION_SZONE,0)
end
function c20644748.svalue(e,fp,rp,r)
return 5-Duel.GetFieldGroupCount(fp,LOCATION_MZONE,0)
if Duel.GetFieldCard(fp,LOCATION_SZONE,5) then
return 4-Duel.GetFieldGroupCount(fp,LOCATION_MZONE,0)
else
return 5-Duel.GetFieldGroupCount(fp,LOCATION_MZONE,0)
end
end
--マーメイド·ナイト
function c24435369.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetCondition(c24435369.dircon)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function c24435369.filter(c)
return c:IsFaceup() and c:IsCode(22702055)
end
function c24435369.dircon(e)
return Duel.IsExistingMatchingCard(c24435369.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.GetEnvironment()==22702055
end
......@@ -26,6 +26,7 @@ function c25789292.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
--薄幸の乙女
function c27618634.initial_effect(c)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetCondition(c27618634.indcon)
c:RegisterEffect(e1)
--battled
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_END)
e2:SetOperation(c27618634.atop)
c:RegisterEffect(e2)
local g=Group.CreateGroup()
g:KeepAlive()
e2:SetLabelObject(g)
--atk limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c27618634.atlcon)
e3:SetTarget(c27618634.atltg)
e3:SetLabelObject(g)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e4:SetLabelObject(g)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHANGE_POS)
e5:SetOperation(c27618634.posop)
c:RegisterEffect(e5)
end
function c27618634.indcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
function c27618634.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc and c:IsPosition(POS_FACEUP_ATTACK) then
if c:GetFlagEffect(27618634)==0 then
c:RegisterFlagEffect(27618634,RESET_EVENT+0x1fe0000,0,1)
e:GetLabelObject():Clear()
end
e:GetLabelObject():AddCard(bc)
bc:RegisterFlagEffect(27618635,RESET_EVENT+0x1fe0000,0,1)
end
end
function c27618634.atlcon(e)
return e:GetHandler():GetFlagEffect(27618634)~=0
end
function c27618634.atltg(e,c)
return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(27618635)~=0
end
function c27618634.posop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(27618634)
end
--機動砦のギア·ゴーレム
function c30190809.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30190809,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c30190809.condition)
e1:SetOperation(c30190809.operation)
c:RegisterEffect(e1)
end
function c30190809.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and e:GetHandler():GetEffectCount(EFFECT_DIRECT_ATTACK)==0
end
function c30190809.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
--電脳増幅器
function c303660.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+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetTarget(c303660.target)
e1:SetOperation(c303660.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c303660.eqlimit)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(c303660.etarget)
e3:SetValue(c303660.efilter)
c:RegisterEffect(e3)
--leave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetOperation(c303660.desop)
c:RegisterEffect(e4)
--cannot disable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_DISABLE)
c:RegisterEffect(e5)
end
function c303660.eqlimit(e,c)
return c:IsCode(77585513)
end
function c303660.filter(c)
return c:IsFaceup() and c:IsCode(77585513)
end
function c303660.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c303660.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c303660.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c303660.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c303660.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 c303660.etarget(e,c)
return c:IsType(TYPE_TRAP)
end
function c303660.efilter(e,re)
return re:GetHandler()==e:GetHandler():GetEquipTarget()
end
function c303660.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--グリフォンの羽根帚
function c34370473.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c34370473.target)
e1:SetOperation(c34370473.activate)
c:RegisterEffect(e1)
end
function c34370473.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c34370473.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c34370473.filter,tp,LOCATION_ONFIELD,0,1,c) end
local g=Duel.GetMatchingGroup(c34370473.filter,tp,LOCATION_ONFIELD,0,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetCount()*500)
end
function c34370473.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c34370473.filter,tp,LOCATION_ONFIELD,0,e:GetHandler())
local ct=Duel.Destroy(g,REASON_EFFECT)
Duel.Recover(tp,ct*500,REASON_EFFECT)
end
--首領亀
function c3493978.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3493978,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c3493978.target)
e1:SetOperation(c3493978.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c3493978.filter(c,e,tp)
return c:IsCode(3493978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c3493978.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c3493978.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c3493978.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3493978.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -5,6 +5,7 @@ function c41639001.initial_effect(c)
e1:SetDescription(aux.Stringid(41639001,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_BECOME_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
......
--幻影のゴラ亀
function c42868711.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c42868711.distg)
c:RegisterEffect(e1)
--disable effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c42868711.disop)
c:RegisterEffect(e2)
--self destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e3:SetTarget(c42868711.distg)
c:RegisterEffect(e3)
end
function c42868711.distg(e,c)
return c:GetControler()~=e:GetHandlerPlayer() and c:IsHasCardTarget(e:GetHandler())
end
function c42868711.disop(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end
if g:IsContains(e:GetHandler()) then
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
end
end
--裁きの光
function c44595286.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMING_TOHAND+0x1e0)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c44595286.condition)
e1:SetCost(c44595286.cost)
e1:SetTarget(c44595286.target)
e1:SetOperation(c44595286.activate)
c:RegisterEffect(e1)
end
function c44595286.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetEnvironment()==56433456
end
function c44595286.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c44595286.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c44595286.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c44595286.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c44595286.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end
end
function c44595286.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local opt=0
if g1:GetCount()>0 and g2:GetCount()>0 then
opt=Duel.SelectOption(tp,aux.Stringid(44595286,0),aux.Stringid(44595286,1))+1
elseif g1:GetCount()>0 then opt=1
elseif g2:GetCount()>0 then opt=2
end
if opt==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
elseif opt==2 then
Duel.ConfirmCards(tp,g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g2:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
end
......@@ -42,9 +42,9 @@ function c4545854.adup(c,oc)
end
function c4545854.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsReason(REASON_RULE)
and Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end
and Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(4545854,0)) then
Duel.RemoveOverlayCard(tp,1,1,1,1,REASON_EFFECT)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)
return true
else return false end
end
--暗黒大要塞鯱
function c63120904.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63120904,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c63120904.target)
e1:SetOperation(c63120904.operation)
c:RegisterEffect(e1)
end
function c63120904.rfilter(c)
local code=c:GetCode()
return code==90337190 or code==95614612
end
function c63120904.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c63120904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return (Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,90337190) and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil))
or (Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,95614612) and Duel.IsExistingTarget(c63120904.dfilter,tp,0,LOCATION_ONFIELD,1,nil)) end
local b1=Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,90337190) and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil)
local b2=Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,95614612) and Duel.IsExistingTarget(c63120904.dfilter,tp,0,LOCATION_ONFIELD,1,nil)
local code=0
if b1 and b2 then
local rg=Duel.SelectReleaseGroup(tp,c63120904.rfilter,1,1,nil)
code=rg:GetFirst():GetCode()
Duel.Release(rg,REASON_COST)
elseif b1 then
local rg=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,90337190)
code=90337190
Duel.Release(rg,REASON_COST)
else
local rg=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,95614612)
code=95614612
Duel.Release(rg,REASON_COST)
end
if code==90337190 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c63120904.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function c63120904.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--水陸両用バグロス MK-3
function c64342551.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(c64342551.dircon)
c:RegisterEffect(e1)
end
function c64342551.filter(c)
return c:IsFaceup() and c:IsCode(22702055)
end
function c64342551.dircon(e)
return Duel.IsExistingMatchingCard(c64342551.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.GetEnvironment()==22702055
end
--サンダー·クラッシュ
function c69196160.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c69196160.target)
e1:SetOperation(c69196160.activate)
c:RegisterEffect(e1)
end
function c69196160.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300)
end
function c69196160.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,0,nil)
local ct=Duel.Destroy(g,REASON_EFFECT)
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end
......@@ -8,6 +8,7 @@ function c71209500.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0+TIMING_DRAW_PHASE)
e1:SetCost(c71209500.efcost)
e1:SetTarget(c71209500.eftg)
e1:SetOperation(c71209500.efop)
c:RegisterEffect(e1)
end
......@@ -18,6 +19,9 @@ end
function c71209500.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4)
end
function c71209500.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71209500.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
end
function c71209500.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c71209500.filter,tp,LOCATION_MZONE,0,nil)
......
--魔法封印の呪符
function c71983925.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c71983925.actcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c71983925.descon)
c:RegisterEffect(e2)
--cannot trigger
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0xa,0xa)
e3:SetTarget(c71983925.distg)
c:RegisterEffect(e3)
--disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e4:SetTarget(c71983925.distg)
c:RegisterEffect(e4)
--disable effect
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_SZONE)
e5:SetOperation(c71983925.disop)
c:RegisterEffect(e5)
end
function c71983925.filter(c)
return c:IsFaceup() and c:IsCode(2468169)
end
function c71983925.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c71983925.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c71983925.descon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c71983925.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c71983925.distg(e,c)
return c:IsType(TYPE_SPELL)
end
function c71983925.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_SPELL) then
Duel.NegateEffect(ev)
end
end
--アーマーブレイク
function c79649195.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c79649195.condition)
e1:SetTarget(c79649195.target)
e1:SetOperation(c79649195.activate)
c:RegisterEffect(e1)
end
function c79649195.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_EQUIP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c79649195.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)
end
end
function c79649195.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--バックファイア
function c82705573.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(82705573,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c82705573.condition)
e2:SetTarget(c82705573.target)
e2:SetOperation(c82705573.operation)
c:RegisterEffect(e2)
end
function c82705573.filter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
and c:GetControler()==tp and c:IsReason(REASON_DESTROY) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c82705573.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c82705573.filter,1,nil,tp)
end
function c82705573.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c82705573.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--追い剥ぎゾンビ
function c83258273.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--handes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(83258273,0))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c83258273.condition)
e2:SetTarget(c83258273.target)
e2:SetOperation(c83258273.operation)
c:RegisterEffect(e2)
end
function c83258273.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():GetControler()==tp
end
function c83258273.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DECKES,0,0,1-tp,1)
end
function c83258273.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.DiscardDeck(1-tp,1,REASON_EFFECT)
end
--ソニックジャマー
function c84550200.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(84550200,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetOperation(c84550200.operation)
c:RegisterEffect(e1)
end
function c84550200.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c84550200.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c84550200.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end
......@@ -28,14 +28,9 @@ function c87608852.initial_effect(c)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CHAIN_NEGATED)
ge3:SetOperation(c87608852.checkop3)
ge3:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge3:SetOperation(c87608852.clear)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge4:SetOperation(c87608852.clear)
Duel.RegisterEffect(ge4,0)
end
end
function c87608852.checkop1(e,tp,eg,ep,ev,re,r,rp)
......@@ -52,11 +47,6 @@ function c87608852.checkop2(e,tp,eg,ep,ev,re,r,rp)
c87608852[rp+2]=c87608852[rp+2]+1
end
end
function c87608852.checkop3(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x106e) then
c87608852[rp+2]=c87608852[rp+2]-1
end
end
function c87608852.clear(e,tp,eg,ep,ev,re,r,rp)
c87608852[0]=true
c87608852[1]=true
......
--魚雷魚
function c90337190.initial_effect(c)
--immune spell
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c90337190.econ)
e1:SetValue(c90337190.efilter)
c:RegisterEffect(e1)
end
function c90337190.filter(c)
return c:IsFaceup() and c:IsCode(22702055)
end
function c90337190.econ(e)
return Duel.IsExistingMatchingCard(c90337190.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.GetEnvironment()==22702055
end
function c90337190.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
--砲弾ヤリ貝
function c95614612.initial_effect(c)
--immune spell
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c95614612.econ)
e1:SetValue(c95614612.efilter)
c:RegisterEffect(e1)
end
function c95614612.filter(c)
return c:IsFaceup() and c:IsCode(22702055)
end
function c95614612.econ(e)
return Duel.IsExistingMatchingCard(c95614612.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.GetEnvironment()==22702055
end
function c95614612.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
......@@ -37,6 +37,7 @@ function c97268402.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......
--壺魔神
function c99284890.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99284890,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c99284890.cost)
e1:SetTarget(c99284890.target)
e1:SetOperation(c99284890.operation)
c:RegisterEffect(e1)
end
function c99284890.filter(c)
return c:IsCode(55144522) and c:IsAbleToGraveAsCost()
end
function c99284890.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99284890.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c99284890.filter,1,1,REASON_COST)
end
function c99284890.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
end
function c99284890.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
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