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

ABYR

parent fb74c2f3
...@@ -1411,7 +1411,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1411,7 +1411,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dField.select_min = 0; mainGame->dField.select_min = 0;
mainGame->dField.select_max = count; mainGame->dField.select_max = count;
mainGame->dField.ShowSelectCard(); mainGame->dField.ShowSelectCard();
return true; return false;
} }
case MSG_CONFIRM_DECKTOP: { case MSG_CONFIRM_DECKTOP: {
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
......
...@@ -419,6 +419,8 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { ...@@ -419,6 +419,8 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
case MSG_CHAIN_END: { case MSG_CHAIN_END: {
DuelClient::ClientAnalyze(offset, pbuf - offset); DuelClient::ClientAnalyze(offset, pbuf - offset);
SinglePlayRefresh(); SinglePlayRefresh();
SinglePlayRefreshDeck(0);
SinglePlayRefreshDeck(1);
break; break;
} }
case MSG_CHAIN_NEGATED: { case MSG_CHAIN_NEGATED: {
......
...@@ -1423,13 +1423,17 @@ int32 card::is_summonable(effect* peffect) { ...@@ -1423,13 +1423,17 @@ int32 card::is_summonable(effect* peffect) {
pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT); pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT);
pduel->lua->add_param(this, PARAM_TYPE_CARD); pduel->lua->add_param(this, PARAM_TYPE_CARD);
uint32 result = FALSE; uint32 result = FALSE;
if(!pduel->game_field->core.limit_tuner) { if(pduel->game_field->core.limit_tuner) {
if(pduel->lua->check_condition(peffect->condition, 2))
result = TRUE;
} else {
pduel->lua->add_param(pduel->game_field->core.limit_tuner, PARAM_TYPE_CARD); pduel->lua->add_param(pduel->game_field->core.limit_tuner, PARAM_TYPE_CARD);
if(pduel->lua->check_condition(peffect->condition, 3)) if(pduel->lua->check_condition(peffect->condition, 3))
result = TRUE; result = TRUE;
} else if(pduel->game_field->core.limit_xyz) {
pduel->lua->add_param(pduel->game_field->core.limit_xyz, PARAM_TYPE_GROUP);
if(pduel->lua->check_condition(peffect->condition, 3))
result = TRUE;
} else {
if(pduel->lua->check_condition(peffect->condition, 2))
result = TRUE;
} }
pduel->game_field->restore_lp_cost(); pduel->game_field->restore_lp_cost();
pduel->game_field->core.reason_effect = oreason; pduel->game_field->core.reason_effect = oreason;
...@@ -1576,6 +1580,7 @@ int32 card::is_special_summonable(uint8 playerid) { ...@@ -1576,6 +1580,7 @@ int32 card::is_special_summonable(uint8 playerid) {
eset.clear(); eset.clear();
filter_spsummon_procedure(playerid, &eset); filter_spsummon_procedure(playerid, &eset);
pduel->game_field->core.limit_tuner = 0; pduel->game_field->core.limit_tuner = 0;
pduel->game_field->core.limit_xyz = 0;
pduel->game_field->restore_lp_cost(); pduel->game_field->restore_lp_cost();
return eset.count; return eset.count;
} }
......
...@@ -66,6 +66,7 @@ field::field(duel* pduel) { ...@@ -66,6 +66,7 @@ field::field(duel* pduel) {
core.overdraw[1] = FALSE; core.overdraw[1] = FALSE;
core.check_level = 0; core.check_level = 0;
core.limit_tuner = 0; core.limit_tuner = 0;
core.limit_xyz = 0;
core.duel_options = 0; core.duel_options = 0;
core.attacker = 0; core.attacker = 0;
core.attack_target = 0; core.attack_target = 0;
......
...@@ -222,6 +222,7 @@ struct processor { ...@@ -222,6 +222,7 @@ struct processor {
card* attack_target; card* attack_target;
card* sub_attack_target; card* sub_attack_target;
card* limit_tuner; card* limit_tuner;
group* limit_xyz;
uint8 attack_cancelable; uint8 attack_cancelable;
uint8 effect_damage_step; uint8 effect_damage_step;
int32 battle_damage[2]; int32 battle_damage[2];
......
...@@ -1037,7 +1037,7 @@ int32 scriptlib::card_is_synchro_summonable(lua_State *L) { ...@@ -1037,7 +1037,7 @@ int32 scriptlib::card_is_synchro_summonable(lua_State *L) {
check_param_count(L, 2); check_param_count(L, 2);
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);
if(!(pcard->get_type()&TYPE_SYNCHRO)) if(!(pcard->data.type & TYPE_SYNCHRO))
return 0; return 0;
card* tuner = 0; card* tuner = 0;
if(!lua_isnil(L, 2)) { if(!lua_isnil(L, 2)) {
......
...@@ -28,7 +28,7 @@ function c11868731.retcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function c11868731.retcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c11868731.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c11868731.rettg(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_TOKEN,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c11868731.retop(e,tp,eg,ep,ev,re,r,rp) function c11868731.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
......
--ガガガガンマン
function c12014404.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,4),2)
c:EnableReviveLimit()
--effect
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DAMAGE)
e1:SetDescription(aux.Stringid(12014404,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c12014404.cost)
e1:SetTarget(c12014404.target)
e1:SetOperation(c12014404.operation)
c:RegisterEffect(e1)
end
function c12014404.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c12014404.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsDefencePos() then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
end
function c12014404.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if c:IsAttackPos() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCountLimit(1)
e1:SetOperation(c12014404.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
else
Duel.Damage(1-tp,800,REASON_EFFECT)
end
end
function c12014404.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-500)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
bc:RegisterEffect(e2)
end
end
...@@ -25,7 +25,7 @@ function c12980373.retcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c12980373.retcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c12980373.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c12980373.rettg(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_TOKEN,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c12980373.retop(e,tp,eg,ep,ev,re,r,rp) function c12980373.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
......
--氷霊神ムーラングレイス
function c13959634.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c13959634.spcon)
c:RegisterEffect(e2)
--handes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13959634,0))
e3:SetCategory(CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c13959634.hdtg)
e3:SetOperation(c13959634.hdop)
c:RegisterEffect(e3)
--leave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetOperation(c13959634.leaveop)
c:RegisterEffect(e4)
end
function c13959634.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_WATER)==5
end
function c13959634.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c13959634.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2)
end
function c13959634.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,2)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end
function c13959634.leaveop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c13959634.skipcon)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end
function c13959634.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
end
...@@ -44,7 +44,7 @@ function c14001430.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c14001430.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c14001430.repfilter(c,tp) function c14001430.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:GetDestination()==LOCATION_DECK return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:GetDestination()==LOCATION_DECK and c:IsType(TYPE_MONSTER)
end end
function c14001430.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c14001430.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re:IsActiveType(TYPE_MONSTER) if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re:IsActiveType(TYPE_MONSTER)
......
--絶海の騎士
function c14771222.initial_effect(c)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14771222,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetCountLimit(1)
e1:SetCondition(c14771222.condition)
e1:SetTarget(c14771222.target)
e1:SetOperation(c14771222.operation)
c:RegisterEffect(e1)
end
function c14771222.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c14771222.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave()
end
function c14771222.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c14771222.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c14771222.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--スノーマン・クリエイター
function c15893860.initial_effect(c)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15893860,0))
e1:SetCategory(CATEGORY_COUNTER+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c15893860.target)
e1:SetOperation(c15893860.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c15893860.ctfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c15893860.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c15893860.ctfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c15893860.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c15893860.ctfilter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(15893860,1))
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x15,1)
end
if ct>=3 and Duel.SelectYesNo(tp,aux.Stringid(15893860,2)) then
local dg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
--はぐれ者傭兵部隊
function c17836042.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17836042,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c17836042.condition)
e1:SetCost(c17836042.cost)
e1:SetTarget(c17836042.target)
e1:SetOperation(c17836042.operation)
c:RegisterEffect(e1)
end
function c17836042.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end
function c17836042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1
and not Duel.CheckSpecialSummonActivity(tp)
and e:GetHandler():IsReleasable() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BP)
Duel.RegisterEffect(e2,tp)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c17836042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c17836042.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
--No.9 天蓋星ダイソン・スフィア
function c1992816.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,9),2)
c:EnableReviveLimit()
--negate attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1992816,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetHintTiming(0,TIMING_BATTLE_PHASE)
e1:SetCondition(c1992816.atkcon)
e1:SetOperation(c1992816.atkop)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1992816,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c1992816.olcon)
e2:SetTarget(c1992816.oltg)
e2:SetOperation(c1992816.olop)
c:RegisterEffect(e2)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1992816,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c1992816.dacon)
e3:SetCost(c1992816.dacost)
e3:SetOperation(c1992816.daop)
c:RegisterEffect(e3)
end
function c1992816.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():GetOverlayCount()~=0
end
function c1992816.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function c1992816.olcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0
end
function c1992816.oltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATINO_GRAVE) and chkc:IsControler(tp) and chkc:IsType(TYPE_MONSTER) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,0,2,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,0,2,2,nil,TYPE_MONSTER)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0)
end
function c1992816.olop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
end
function c1992816.dafilter(c,atk)
return c:IsFaceup() and c:GetAttack()>atk
end
function c1992816.dacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
and Duel.IsExistingMatchingCard(c1992816.dafilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack())
end
function c1992816.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1992816.daop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--水精鱗-アビスタージ
function c22076135.initial_effect(c)
--salvage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22076135,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCost(c22076135.thcost)
e1:SetTarget(c22076135.thtg)
e1:SetOperation(c22076135.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c22076135.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable()
end
function c22076135.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,22076135)==0
and Duel.IsExistingMatchingCard(c22076135.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c22076135.cfilter,1,1,REASON_COST+REASON_DISCARD)
Duel.RegisterFlagEffect(tp,22076135,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c22076135.filter(c)
return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
end
function c22076135.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22076135.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22076135.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c22076135.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c22076135.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--水精鱗-アビスリンデ
function c23899727.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23899727,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c23899727.condition)
e1:SetCost(c23899727.cost)
e1:SetTarget(c23899727.target)
e1:SetOperation(c23899727.operation)
c:RegisterEffect(e1)
end
function c23899727.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c23899727.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,23899727)==0 end
Duel.RegisterFlagEffect(tp,23899727,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c23899727.filter(c,e,tp)
return c:IsSetCard(0x74) and c:GetCode()~=23899727 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c23899727.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c23899727.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c23899727.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c23899727.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--マドルチェ・マーマメイド
function c26016357.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26016357,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c26016357.retcon)
e1:SetTarget(c26016357.rettg)
e1:SetOperation(c26016357.retop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26016357,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FLIP)
e2:SetTarget(c26016357.thtg)
e2:SetOperation(c26016357.thop)
c:RegisterEffect(e2)
end
function c26016357.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp
end
function c26016357.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c26016357.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c26016357.filter(c)
return c:IsSetCard(0x71) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c26016357.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c26016357.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c26016357.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c26016357.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c26016357.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.SendtoHand(tc,nil,REASON_EFFET)
Duel.ConfirmCards(1-tp,tc)
end
end
--魔導教士 システィ
function c26732909.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26732909,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c26732909.thcost)
e1:SetTarget(c26732909.thtg)
e1:SetOperation(c26732909.thop)
c:RegisterEffect(e1)
if not c26732909.global_check then
c26732909.global_check=true
c26732909[0]=0
c26732909[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c26732909.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHAIN_NEGATED)
ge2:SetOperation(c26732909.checkop2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge3:SetOperation(c26732909.clear)
Duel.RegisterEffect(ge3,0)
end
end
function c26732909.checkop1(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x106e) then
c26732909[rp]=c26732909[rp]+1
end
end
function c26732909.checkop2(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x106e) then
c26732909[rp]=c26732909[rp]+1
end
end
function c26732909.clear(e,tp,eg,ep,ev,re,r,rp)
c26732909[0]=0
c26732909[1]=0
end
function c26732909.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c26732909[tp]>0 and Duel.GetFlagEffect(tp,26732909)==0 and e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,26732909,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c26732909.filter1(c)
return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c26732909.filter2(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x106e) and c:IsAbleToHand()
end
function c26732909.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26732909.filter1,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c26732909.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c26732909.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c26732909.filter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c26732909.filter2,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
g1:Merge(g2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c27243130.initial_effect(c) function c27243130.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
...@@ -19,8 +19,7 @@ function c27243130.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -19,8 +19,7 @@ function c27243130.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end 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 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.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c27243130.activate(e,tp,eg,ep,ev,re,r,rp) function c27243130.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--太陽風帆船
function c33911264.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c33911264.spcon)
e1:SetOperation(c33911264.spop)
c:RegisterEffect(e1)
--level up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33911264,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c33911264.lvcon)
e2:SetOperation(c33911264.lvop)
c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c33911264.excon)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_SPSUMMON_CONDITION)
e5:SetValue(c33911264.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c33911264.descon)
c:RegisterEffect(e6)
end
function c33911264.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c33911264.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c33911264.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENCE)
e2:SetValue(1200)
c:RegisterEffect(e2)
end
function c33911264.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c33911264.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
function c33911264.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==33911264 and (fid==nil or c:GetFieldID()<fid)
end
function c33911264.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c33911264.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c33911264.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c33911264.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c33911264.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c33911264.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
--H・C エクストラ・ソード
function c34143852.initial_effect(c)
--effect gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCondition(c34143852.efcon)
e1:SetOperation(c34143852.efop)
c:RegisterEffect(e1)
end
function c34143852.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c34143852.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(34143852,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c34143852.atkcon)
e1:SetOperation(c34143852.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetValue(TYPE_MONSTER+TYPE_EFFECT+TYPE_XYZ)
e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e2)
end
end
function c34143852.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c34143852.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
--グランドラン
function c35866404.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_ATTACK,0)
e1:SetCondition(c35866404.spcon)
c:RegisterEffect(e1)
end
function c35866404.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c35866404.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c35866404.filter,c:GetControler(),0,LOCATION_MZONE,1,nil)
end
--ブルブレーダー
function c36088082.initial_effect(c)
--level change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36088082,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c36088082.regcon)
e1:SetOperation(c36088082.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(36088082,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetOperation(c36088082.regop)
c:RegisterEffect(e2)
end
function c36088082.regcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()~=nil
end
function c36088082.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_END)
e3:SetOperation(c36088082.desop)
e3:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e3,tp)
end
end
function c36088082.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetOwner():GetBattleTarget(),REASON_EFFECT)
end
--クイーンマドルチェ・ティアラミス
function c37164373.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c37164373.xyzfilter,2)
c:EnableReviveLimit()
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(37164373,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c37164373.cost)
e1:SetTarget(c37164373.target)
e1:SetOperation(c37164373.operation)
c:RegisterEffect(e1)
end
function c37164373.xyzfilter(c)
return c:IsSetCard(0x71) and c:GetLevel()==4
end
function c37164373.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c37164373.filter(c)
return c:IsSetCard(0x71) and c:IsAbleToDeck()
end
function c37164373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c37164373.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c37164373.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c37164373.filter,tp,LOCATION_GRAVE,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c37164373.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local dg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
if ct>0 and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(37164373,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=dg:Select(tp,1,ct,nil)
Duel.SendtoDeck(rg,nil,2,REASON_EFFECT)
end
end
--機海竜プレシオン
function c40160226.initial_effect(c)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40160226,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c40160226.ntcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40160226,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c40160226.cost)
e2:SetTarget(c40160226.target)
e2:SetOperation(c40160226.operation)
c:RegisterEffect(e2)
end
function c40160226.ntfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SEASERPENT)
end
function c40160226.ntcon(e,c)
if c==nil then return true end
return c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c40160226.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c40160226.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_WATER) end
local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WATER)
Duel.Release(g,REASON_COST)
end
function c40160226.filter(c)
return c:IsFaceup() and c:IsDestructable()
end
function c40160226.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c40160226.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c40160226.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c40160226.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c40160226.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
...@@ -11,7 +11,7 @@ function c4031928.initial_effect(c) ...@@ -11,7 +11,7 @@ function c4031928.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c4031928.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4031928.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
......
--ハウスダストン
function c40343749.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40343749,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c40343749.condition)
e1:SetTarget(c40343749.target)
e1:SetOperation(c40343749.operation)
c:RegisterEffect(e1)
end
function c40343749.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_BATTLE) then
return c:GetReasonPlayer()~=tp and bit.band(c:GetBattlePosition(),POS_FACEUP)~=0
else
return rp~=tp and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end
end
function c40343749.filter(c,e,tp)
return c:IsCode(40343749) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function c40343749.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c40343749.filter,tp,LOCATION_DECK+LOCATION_HAND,0,2,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_HAND)
end
function c40343749.operation(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ft1<=0 or ft2<=0 then return end
if ft1>ft2 then ft1=ft2 end
local g=Duel.GetMatchingGroup(c40343749.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
local ct=math.floor(g:GetCount()/2)
if ct==0 then return end
if ct>ft1 then ct=ft1 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(40343749,1))
local sg1=g:Select(tp,1,ct,nil)
local tc=sg1:GetFirst()
g:Sub(sg1)
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc=sg1:GetNext()
end
local sg2=g:Select(tp,sg1:GetCount(),sg1:GetCount(),nil)
tc=sg2:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP)
tc=sg2:GetNext()
end
Duel.SpecialSummonComplete()
end
...@@ -12,7 +12,7 @@ function c43237273.initial_effect(c) ...@@ -12,7 +12,7 @@ function c43237273.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c43237273.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c43237273.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()~=tp and chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
......
--No.8 紋章王ゲノム・ヘリター
function c47387961.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c47387961.xyzfilter,2)
c:EnableReviveLimit()
--attack up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(47387961,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c47387961.cost)
e1:SetTarget(c47387961.target)
e1:SetOperation(c47387961.operation)
c:RegisterEffect(e1)
end
function c47387961.xyzfilter(c)
return c:IsSetCard(0x76) and c:GetLevel()==4
end
function c47387961.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c47387961.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c47387961.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c47387961.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c47387961.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c47387961.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c47387961.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(tc:GetTextAttack())
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENCE)
e3:SetValue(tc:GetTextDefence())
c:RegisterEffect(e3)
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_ATTACK_FINAL)
e4:SetValue(0)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DISABLE)
tc:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e6)
end
end
--H-C ガーンデーヴァ
function c48009503.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c48009503.xyzfilter,2)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(48009503,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c48009503.cost)
e1:SetTarget(c48009503.target)
e1:SetOperation(c48009503.operation)
c:RegisterEffect(e1)
end
function c48009503.xyzfilter(c)
return c:GetLevel()==4 and c:IsRace(RACE_WARRIOR)
end
function c48009503.filter(c,e,tp)
return c:IsFaceup() and c:IsControler(1-tp) and c:IsLevelBelow(4) and (not e or c:IsRelateToEffect(e))
end
function c48009503.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c48009503.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c48009503.filter,1,nil,nil,tp) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c48009503.operation(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c48009503.filter,nil,e,tp)
Duel.Destroy(g,REASON_EFFECT)
end
...@@ -26,7 +26,7 @@ function c48252330.retcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +26,7 @@ function c48252330.retcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c48252330.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c48252330.rettg(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_TOKEN,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c48252330.retop(e,tp,eg,ep,ev,re,r,rp) function c48252330.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
......
--CNo.32 海咬龍シャーク・ドレイク・バイス
function c49221191.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,c49221191.xyzfilter,4,c49221191.ovfilter,aux.Stringid(49221191,0))
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49221191,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c49221191.condition)
e1:SetCost(c49221191.cost)
e1:SetTarget(c49221191.target)
e1:SetOperation(c49221191.operation)
c:RegisterEffect(e1)
end
function c49221191.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()==4
end
function c49221191.ovfilter(c)
return c:IsFaceup() and c:IsCode(65676461)
end
function c49221191.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=1000
end
function c49221191.rfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c49221191.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c49221191.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c49221191.rfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c49221191.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 c49221191.operation(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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENCE_FINAL)
tc:RegisterEffect(e2)
end
end
...@@ -27,7 +27,7 @@ function c49374988.retcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c49374988.retcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c49374988.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c49374988.rettg(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_TOKEN,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c49374988.retop(e,tp,eg,ep,ev,re,r,rp) function c49374988.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
......
--フィッシュボーグ-プランター
function c51281878.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(51281878,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetTarget(c51281878.target)
e1:SetOperation(c51281878.operation)
c:RegisterEffect(e1)
end
function c51281878.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c51281878.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.DiscardDeck(tp,1,REASON_EFFECT)
local c=e:GetHandler()
local tc=Duel.GetOperatedGroup():GetFirst()
if tc and c:IsRelateToEffect(e) and tc:IsLocation(LOCATION_GRAVE) and tc:IsAttribute(ATTRIBUTE_WATER) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--マドルチェ・メッセンジェラート
function c52404456.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(52404456,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c52404456.retcon)
e1:SetTarget(c52404456.rettg)
e1:SetOperation(c52404456.retop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(52404456,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c52404456.shcon)
e2:SetTarget(c52404456.shtg)
e2:SetOperation(c52404456.shop)
c:RegisterEffect(e2)
end
function c52404456.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp
end
function c52404456.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c52404456.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c52404456.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x71) and c:IsRace(RACE_BEAST)
end
function c52404456.shcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c52404456.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c52404456.filter(c)
return c:IsSetCard(0x71) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c52404456.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c52404456.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c52404456.shop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c52404456.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c52404456.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--魔導皇士 アンプール
function c53136004.initial_effect(c)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(53136004,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c53136004.cost)
e1:SetTarget(c53136004.target)
e1:SetOperation(c53136004.operation)
c:RegisterEffect(e1)
end
function c53136004.cfilter1(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost()
end
function c53136004.cfilter2(c)
return c:IsSetCard(0x106e) and c:IsAbleToRemoveAsCost()
end
function c53136004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,53136004)==0 and e:GetHandler():GetAttackAnnouncedCount()==0
and Duel.IsExistingMatchingCard(c53136004.cfilter1,tp,LOCATION_MZONE,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c53136004.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c53136004.cfilter1,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c53136004.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e:GetHandler():RegisterEffect(e1)
Duel.RegisterFlagEffect(tp,53136004,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c53136004.filter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c53136004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c53136004.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c53136004.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c53136004.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c53136004.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--魔導術士 ラパンデ
function c54359696.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(54359696,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetTarget(c54359696.target)
e1:SetOperation(c54359696.operation)
c:RegisterEffect(e1)
end
function c54359696.filter(c)
return c:IsSetCard(0x6e) and c:GetLevel()==3 and c:IsAbleToHand()
end
function c54359696.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOAND,nil,1,tp,LOCATION_DECK)
end
function c54359696.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c54359696.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--水精鱗-アビスパイク
function c58471134.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58471134,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCost(c58471134.thcost)
e1:SetTarget(c58471134.thtg)
e1:SetOperation(c58471134.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c58471134.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable()
end
function c58471134.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,58471134)==0
and Duel.IsExistingMatchingCard(c58471134.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c58471134.cfilter,1,1,REASON_COST+REASON_DISCARD)
Duel.RegisterFlagEffect(tp,58471134,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c58471134.filter(c)
return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
end
function c58471134.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c58471134.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c58471134.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c58471134.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--紋章獣アバコーンウェイ
function c60316373.initial_effect(c)
--salvage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60316373,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c60316373.cost)
e1:SetTarget(c60316373.target)
e1:SetOperation(c60316373.operation)
c:RegisterEffect(e1)
end
function c60316373.rfilter(c)
return c:IsCode(60316373) and c:IsAbleToRemoveAsCost()
end
function c60316373.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,60316373)==0
and Duel.IsExistingMatchingCard(c60316373.rfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c60316373.rfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,60316373,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c60316373.filter(c)
return c:IsSetCard(0x76) and c:IsAbleToHand()
end
function c60316373.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c60316373.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60316373.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c60316373.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c60316373.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFEFCT)>0 then
Duel.ConfirmCards(1-tp,tc)
end
end
--H・C 夜襲のカンテラ
function c61132951.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61132951,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(c61132951.destg)
e1:SetOperation(c61132951.desop)
c:RegisterEffect(e1)
end
function c61132951.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 and d:IsDefencePos() and d:IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end
function c61132951.desop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d~=nil and d:IsRelateToBattle() and d:IsDefencePos() then
Duel.Destroy(d,REASON_EFFECT)
end
end
--トライポッド・フィッシュ
function c61254509.initial_effect(c)
--lv up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61254509,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c61254509.condition)
e1:SetTarget(c61254509.target)
e1:SetOperation(c61254509.operation)
c:RegisterEffect(e1)
end
function c61254509.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
function c61254509.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsLevelAbove(1)
end
function c61254509.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c61254509.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c61254509.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c61254509.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
--アチャチャチャンバラー
function c62476197.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62476197,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c62476197.spcon)
e1:SetTarget(c62476197.sptg)
e1:SetOperation(c62476197.spop)
c:RegisterEffect(e1)
end
function c62476197.spcon(e,tp,eg,ep,ev,re,r,rp)
local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE)
if ex then return true end
ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER)
return ex and ((cp~=PLAYER_ALL and Duel.IsPlayerAffectedByEffect(cp,EFFECT_REVERSE_RECOVER)) or
(cp~=PLAYER_ALL and (Duel.IsPlayerAffectedByEffect(0,EFFECT_REVERSE_RECOVER) or Duel.IsPlayerAffectedByEffect(1,EFFECT_REVERSE_RECOVER))))
end
function c62476197.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400)
end
function c62476197.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Damage(1-tp,400,REASON_EFFECT)
end
end
--水精鱗-アビスグンデ
function c69293721.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69293721,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c69293721.condition)
e1:SetCost(c69293721.cost)
e1:SetTarget(c69293721.target)
e1:SetOperation(c69293721.operation)
c:RegisterEffect(e1)
end
function c69293721.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DISCARD) and e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c69293721.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,69293721)==0 end
Duel.RegisterFlagEffect(tp,69293721,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c69293721.filter(c,e,tp)
return c:IsSetCard(0x74) and c:GetCode()~=69293721 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69293721.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c69293721.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c69293721.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69293721.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c69293721.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -32,6 +32,7 @@ function c69610924.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,6 +32,7 @@ function c69610924.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500) e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1ff0000)
......
--スノーダスト・ジャイアント
function c73659078.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c73659078.xyzfilter,2)
c:EnableReviveLimit()
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(73659078,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c73659078.cost)
e1:SetOperation(c73659078.operation)
c:RegisterEffect(e1)
--atkdown
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c73659078.atktg)
e2:SetValue(c73659078.atkval)
c:RegisterEffect(e2)
end
function c73659078.xyzfilter(c)
return c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_WATER)
end
function c73659078.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and not c:IsPublic()
end
function c73659078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c73659078.cfilter,tp,LOCATION_HAND,0,1,nil) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c73659078.cfilter,tp,LOCATION_HAND,0,1,99,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
e:SetLabel(g:GetCount())
end
function c73659078.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 ct=e:GetLabel()
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(73659078,1))
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x15,1)
end
end
function c73659078.atktg(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
function c73659078.atkval(e,c)
return Duel.GetCounter(0,1,1,0x15)*-200
end
--水精鱗-ガイオアビス
function c74371660.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c74371660.xyzfilter,2)
c:EnableReviveLimit()
--atklimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,5))
e1:SetCondition(c74371660.dscon)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74371660,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,0x1c0)
e2:SetCost(c74371660.cost)
e2:SetTarget(c74371660.target)
e2:SetOperation(c74371660.operation)
c:RegisterEffect(e2)
end
function c74371660.xyzfilter(c)
return c:GetLevel()==7 and c:IsAttribute(ATTRIBUTE_WATER)
end
function c74371660.dscon(e)
return e:GetHandler():GetOverlayCount()~=0
end
function c74371660.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c74371660.filter(c,atk)
return c:IsFaceup() and c:GetAttack()<atk
end
function c74371660.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74371660.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end
end
function c74371660.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c74371660.filter,tp,0,LOCATION_MZONE,nil,c:GetAttack())
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.NegateRelatedChain(tc)
tc=g:GetNext()
end
end
--H-C クサナギ
function c74593218.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c74593218.xyzfilter,3)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74593218,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c74593218.negcon)
e1:SetCost(c74593218.negcost)
e1:SetTarget(c74593218.negtg)
e1:SetOperation(c74593218.negop)
c:RegisterEffect(e1)
end
function c74593218.xyzfilter(c)
return c:IsRace(RACE_WARRIOR) and c:GetLevel()==4
end
function c74593218.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c74593218.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c74593218.negtg(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 c74593218.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
Duel.BreakEffect()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
end
...@@ -39,7 +39,7 @@ function c74641045.retcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c74641045.retcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c74641045.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c74641045.rettg(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_TOKEN,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c74641045.retop(e,tp,eg,ep,ev,re,r,rp) function c74641045.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
......
...@@ -25,7 +25,7 @@ function c75363626.retcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c75363626.retcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c75363626.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c75363626.rettg(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_TOKEN,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c75363626.retop(e,tp,eg,ep,ev,re,r,rp) function c75363626.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
......
--隻眼のスキル・ゲイナー
function c75620895.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,4),3)
c:EnableReviveLimit()
--attack up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(75620895,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c75620895.cost)
e1:SetTarget(c75620895.target)
e1:SetOperation(c75620895.operation)
c:RegisterEffect(e1)
end
function c75620895.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c75620895.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c75620895.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c75620895.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c75620895.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c75620895.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c75620895.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
c:CopyEffect(code,RESET_EVENT+0x1fe0000,1)
end
end
...@@ -11,9 +11,9 @@ function c76263644.initial_effect(c) ...@@ -11,9 +11,9 @@ function c76263644.initial_effect(c)
e2:SetDescription(aux.Stringid(76263644,0)) e2:SetDescription(aux.Stringid(76263644,0))
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c76263644.descondition) e2:SetCondition(c76263644.descon)
e2:SetTarget(c76263644.destarget) e2:SetTarget(c76263644.destg)
e2:SetOperation(c76263644.desoperation) e2:SetOperation(c76263644.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Special Summon --Special Summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -22,39 +22,18 @@ function c76263644.initial_effect(c) ...@@ -22,39 +22,18 @@ function c76263644.initial_effect(c)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY) e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetDescription(aux.Stringid(76263644,1)) e3:SetDescription(aux.Stringid(76263644,1))
e3:SetCondition(c76263644.spcondition) e3:SetCondition(c76263644.spcon)
e3:SetCost(c76263644.spcost) e3:SetCost(c76263644.spcost)
e3:SetTarget(c76263644.sptarget) e3:SetTarget(c76263644.sptg)
e3:SetOperation(c76263644.spoperation) e3:SetOperation(c76263644.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
c:EnableReviveLimit()
end end
c76263644.material_count=2 c76263644.material_count=2
c76263644.material={83965310,17132130} c76263644.material={83965310,17132130}
function c76263644.fscondition(e,g,gc) function c76263644.descon(e,tp,eg,ep,ev,re,r,rp)
if g==nil then return false end
if gc then return (gc:IsCode(83965310) and g:IsExists(Card.IsCode,1,nil,17132130))
or (gc:IsCode(17132130) and g:IsExists(Card.IsCode,1,nil,83965310)) end
return g:IsExists(Card.IsCode,1,nil,83965310) and g:IsExists(Card.IsCode,1,nil,17132130)
end
function c76263644.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc)
if gc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
if gc:IsCode(83965310) then Duel.SetFusionMaterial(eg:FilterSelect(tp,Card.IsCode,1,1,nil,17132130))
else Duel.SetFusionMaterial(eg:FilterSelect(tp,Card.IsCode,1,1,nil,83965310)) end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=eg:FilterSelect(tp,Card.IsCode,1,1,nil,83965310)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=eg:FilterSelect(tp,Card.IsCode,1,1,nil,17132130)
g1:Merge(g2)
Duel.SetFusionMaterial(g1)
end
end
function c76263644.descondition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 return Duel.GetCurrentPhase()==PHASE_MAIN1
end end
function c76263644.destarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c76263644.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
...@@ -72,7 +51,7 @@ function c76263644.destarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -72,7 +51,7 @@ function c76263644.destarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c76263644.desoperation(e,tp,eg,ep,ev,re,r,rp) function c76263644.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local atk=0 local atk=0
...@@ -81,7 +60,7 @@ function c76263644.desoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +60,7 @@ function c76263644.desoperation(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
end end
end end
function c76263644.spcondition(e,tp,eg,ep,ev,re,r,rp) function c76263644.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetTurnPlayer()==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
...@@ -94,11 +73,11 @@ end ...@@ -94,11 +73,11 @@ end
function c76263644.spfilter(c) function c76263644.spfilter(c)
return c:IsSetCard(0xc008) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xc008) and c:IsAbleToRemoveAsCost()
end end
function c76263644.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) function c76263644.sptg(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_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c76263644.spoperation(e,tp,eg,ep,ev,re,r,rp) function c76263644.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
......
--魔導皇聖 トリス
function c770365.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c770365.xyzfilter,2)
c:EnableReviveLimit()
--atklimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c770365.atkval)
c:RegisterEffect(e1)
--confiem
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(770365,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c770365.cost)
e2:SetTarget(c770365.target)
e2:SetOperation(c770365.operation)
c:RegisterEffect(e2)
end
function c770365.xyzfilter(c)
return c:GetLevel()==5 and c:IsRace(RACE_SPELLCASTER)
end
function c770365.atkval(e,c)
return Duel.GetOverlayCount(tp,1,0)*300
end
function c770365.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c770365.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
end
function c770365.filter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL)
end
function c770365.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp)
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local ct=g:FilterCount(c770365.filter,nil)
local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if ct>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(770365,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=sg:Select(tp,1,ct,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
Duel.SortDecktop(tp,tp,5)
end
--ディープ・スィーパー
function c8649148.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8649148,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c8649148.cost)
e1:SetTarget(c8649148.target)
e1:SetOperation(c8649148.operation)
c:RegisterEffect(e1)
end
function c8649148.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c8649148.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c8649148.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c8649148.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c8649148.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c8649148.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c8649148.operation(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 c87564935.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87564935,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c87564935.eqtg)
e1:SetOperation(c87564935.eqop)
c:RegisterEffect(e1)
--unequip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87564935,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c87564935.uncon)
e2:SetTarget(c87564935.sptg)
e2:SetOperation(c87564935.spop)
c:RegisterEffect(e2)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetCondition(c87564935.uncon)
e3:SetValue(c87564935.efilter)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetCondition(c87564935.uncon)
e4:SetValue(c87564935.efilter)
c:RegisterEffect(e4)
--destroy sub
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e5:SetCondition(c87564935.uncon)
e5:SetValue(c87564935.repval)
c:RegisterEffect(e5)
--eqlimit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EQUIP_LIMIT)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function c87564935.uncon(e)
return e:GetHandler():IsStatus(STATUS_UNION)
end
function c87564935.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c87564935.filter(c)
return c:IsFaceup() and c:GetUnionCount()==0
end
function c87564935.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c87564935.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(87564935)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c87564935.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c87564935.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
e:GetHandler():RegisterFlagEffect(87564935,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c87564935.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c87564935.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
c:SetStatus(STATUS_UNION,true)
end
function c87564935.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(87564935)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(87564935,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c87564935.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
end
end
function c87564935.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
...@@ -28,9 +28,14 @@ function c87608852.initial_effect(c) ...@@ -28,9 +28,14 @@ function c87608852.initial_effect(c)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c) local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_PHASE_START+PHASE_DRAW) ge3:SetCode(EVENT_CHAIN_NEGATED)
ge3:SetOperation(c87608852.clear) ge3:SetOperation(c87608852.checkop3)
Duel.RegisterEffect(ge3,0) 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
end end
function c87608852.checkop1(e,tp,eg,ep,ev,re,r,rp) function c87608852.checkop1(e,tp,eg,ep,ev,re,r,rp)
...@@ -47,6 +52,11 @@ function c87608852.checkop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,6 +52,11 @@ function c87608852.checkop2(e,tp,eg,ep,ev,re,r,rp)
c87608852[rp+2]=c87608852[rp+2]+1 c87608852[rp+2]=c87608852[rp+2]+1
end end
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) function c87608852.clear(e,tp,eg,ep,ev,re,r,rp)
c87608852[0]=true c87608852[0]=true
c87608852[1]=true c87608852[1]=true
......
--アビス・ウォリアー
function c88409165.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88409165,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c88409165.cost)
e1:SetTarget(c88409165.target)
e1:SetOperation(c88409165.operation)
c:RegisterEffect(e1)
end
function c88409165.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c88409165.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88409165.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c88409165.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c88409165.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c88409165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c88409165.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88409165.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c88409165.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c88409165.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
or Duel.SelectOption(tp,aux.Stringid(88409165,1),aux.Stringid(88409165,2))==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
end
end
end
--素早いアンコウ
function c88686573.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88686573,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c88686573.condition)
e1:SetTarget(c88686573.target)
e1:SetOperation(c88686573.operation)
c:RegisterEffect(e1)
end
function c88686573.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)
end
function c88686573.filter(c,e,tp)
return c:IsSetCard(0x78) and c:GetCode()~=88686573 and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88686573.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c88686573.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c88686573.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>2 then ft=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c88686573.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--マドルチェ・クロワンサン
function c89521713.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(89521713,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c89521713.retcon)
e1:SetTarget(c89521713.rettg)
e1:SetOperation(c89521713.retop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(89521713,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c89521713.thtg)
e2:SetOperation(c89521713.thop)
c:RegisterEffect(e2)
end
function c89521713.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp
end
function c89521713.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c89521713.retop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
function c89521713.filter(c)
return c:IsFaceup() and c:IsSetCard(0x71) and c:IsAbleToHand()
end
function c89521713.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c89521713.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c89521713.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c89521713.filter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c89521713.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFET)>0 then
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(300)
c:RegisterEffect(e2)
end
end
end
--覚醒の勇士 ガガギゴ
function c9053187.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,4),3)
c:EnableReviveLimit()
end
--魔導老士 エアミット
function c90743290.initial_effect(c)
--atk/lvup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(c90743290.condition)
e1:SetOperation(c90743290.operation)
c:RegisterEffect(e1)
end
function c90743290.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x106e)
end
function c90743290.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(300)
c:RegisterEffect(e2)
end
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c92826944.initial_effect(c) function c92826944.initial_effect(c)
--revive --revive
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92826944,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
......
--水精鱗-アビスラング
function c95466842.initial_effect(c)
--at limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetTarget(c95466842.atlimit)
e1:SetValue(1)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e2:SetValue(300)
c:RegisterEffect(e2)
end
function c95466842.atlimit(e,c)
return c~=e:GetHandler() and c:IsAttribute(ATTRIBUTE_WATER)
end
--ガガガカイザー
function c9583383.initial_effect(c)
--atklimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetCondition(c9583383.atkcon)
c:RegisterEffect(e1)
--unsynchroable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--level change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9583383,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c9583383.lvcost)
e3:SetOperation(c9583383.lvop)
c:RegisterEffect(e3)
end
function c9583383.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x54)
end
function c9583383.atkcon(e)
return not Duel.IsExistingMatchingCard(c9583383.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c9583383.rfilter(c)
return c:GetLevel()>0 and c:IsAbleToRemoveAsCost()
end
function c9583383.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9583383.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9583383.rfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local lv=g:GetFirst():GetLevel()
Duel.SetTargetParam(lv)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c9583383.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9583383.cfilter,tp,LOCATION_MZONE,0,nil)
local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1ff0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--水精鱗-アビスヒルデ
function c96682430.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96682430,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCost(c96682430.cost)
e1:SetTarget(c96682430.target)
e1:SetOperation(c96682430.operation)
c:RegisterEffect(e1)
end
function c96682430.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,96682430)==0 end
Duel.RegisterFlagEffect(tp,96682430,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c96682430.filter(c,e,tp)
return c:IsSetCard(0x74) and c:GetCode()~=96682430 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c96682430.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c96682430.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c96682430.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c96682430.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 c96704018.initial_effect(c)
--lv change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96704018,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c96704018.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c96704018.filter(c)
return c:IsFaceup() and c:IsLevelAbove(5)
end
function c96704018.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c96704018.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(4)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--禁じられた聖衣
function c96864811.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
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(c96864811.condition)
e1:SetTarget(c96864811.target)
e1:SetOperation(c96864811.activate)
c:RegisterEffect(e1)
end
function c96864811.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c96864811.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 c96864811.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
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(-600)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
--惑星探査車
function c97526666.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(97526666,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c97526666.cost)
e1:SetTarget(c97526666.target)
e1:SetOperation(c97526666.operation)
c:RegisterEffect(e1)
end
function c97526666.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c97526666.filter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c97526666.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97526666.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c97526666.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c97526666.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--モグモール
function c9861795.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9861795,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c9861795.condition)
e1:SetTarget(c9861795.target)
e1:SetOperation(c9861795.operation)
c:RegisterEffect(e1)
end
c9861795[0]=true
c9861795[1]=true
function c9861795.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c9861795.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c9861795[tp] and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
c9861795[tp]=false
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9861795.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment