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

fix

parent 420dc3c5
...@@ -59,6 +59,8 @@ card::card() { ...@@ -59,6 +59,8 @@ card::card() {
memset(&current, 0, sizeof(card_state)); memset(&current, 0, sizeof(card_state));
memset(&previous, 0, sizeof(card_state)); memset(&previous, 0, sizeof(card_state));
memset(&temp, 0xff, sizeof(card_state)); memset(&temp, 0xff, sizeof(card_state));
unique_pos[0] = unique_pos[1] = 0;
unique_code = 0;
current.controler = PLAYER_NONE; current.controler = PLAYER_NONE;
} }
card::~card() { card::~card() {
...@@ -677,6 +679,8 @@ void card::apply_field_effect() { ...@@ -677,6 +679,8 @@ void card::apply_field_effect() {
pduel->game_field->add_effect(it->second); pduel->game_field->add_effect(it->second);
} }
} }
if(unique_code && (current.location & LOCATION_ONFIELD))
pduel->game_field->add_unique_card(this);
} }
void card::cancel_field_effect() { void card::cancel_field_effect() {
if (current.controler == PLAYER_NONE) if (current.controler == PLAYER_NONE)
...@@ -685,6 +689,8 @@ void card::cancel_field_effect() { ...@@ -685,6 +689,8 @@ void card::cancel_field_effect() {
if (current.location & it->second->range) if (current.location & it->second->range)
pduel->game_field->remove_effect(it->second); pduel->game_field->remove_effect(it->second);
} }
if(unique_code && current.location & LOCATION_ONFIELD)
pduel->game_field->remove_unique_card(this);
} }
void card::enable_field_effect(int32 enabled) { void card::enable_field_effect(int32 enabled) {
if (current.location == 0) if (current.location == 0)
...@@ -855,6 +861,11 @@ void card::remove_effect(effect* peffect, effect_container::iterator it) { ...@@ -855,6 +861,11 @@ void card::remove_effect(effect* peffect, effect_container::iterator it) {
pduel->write_buffer8(CHINT_DESC_REMOVE); pduel->write_buffer8(CHINT_DESC_REMOVE);
pduel->write_buffer32(peffect->description); pduel->write_buffer32(peffect->description);
} }
if(peffect->code == EFFECT_UNIQUE_CHECK) {
pduel->game_field->remove_unique_card(this);
unique_pos[0] = unique_pos[1] = 0;
unique_code = 0;
}
pduel->game_field->core.reseted_effects.insert(peffect); pduel->game_field->core.reseted_effects.insert(peffect);
} }
int32 card::copy_effect(uint32 code, uint32 reset, uint32 count) { int32 card::copy_effect(uint32 code, uint32 reset, uint32 count) {
...@@ -1456,6 +1467,8 @@ int32 card::is_summonable(effect* peffect) { ...@@ -1456,6 +1467,8 @@ int32 card::is_summonable(effect* peffect) {
int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffect) { int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffect) {
if(!is_summonable()) if(!is_summonable())
return FALSE; return FALSE;
if(pduel->game_field->check_unique_onfield(this, playerid))
return FALSE;
if(!ignore_count && (pduel->game_field->core.extra_summon[playerid] || !is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT)) if(!ignore_count && (pduel->game_field->core.extra_summon[playerid] || !is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT))
&& pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid)) && pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid))
return FALSE; return FALSE;
...@@ -1557,6 +1570,8 @@ int32 card::is_can_be_flip_summoned(uint8 playerid) { ...@@ -1557,6 +1570,8 @@ int32 card::is_can_be_flip_summoned(uint8 playerid) {
return FALSE; return FALSE;
if(!(current.position & POS_FACEDOWN)) if(!(current.position & POS_FACEDOWN))
return FALSE; return FALSE;
if(pduel->game_field->check_unique_onfield(this, playerid))
return FALSE;
if(!pduel->game_field->is_player_can_flipsummon(playerid, this)) if(!pduel->game_field->is_player_can_flipsummon(playerid, this))
return FALSE; return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN)) if(is_affected_by_effect(EFFECT_FORBIDDEN))
...@@ -1583,6 +1598,8 @@ int32 card::is_can_be_flip_summoned(uint8 playerid) { ...@@ -1583,6 +1598,8 @@ int32 card::is_can_be_flip_summoned(uint8 playerid) {
int32 card::is_special_summonable(uint8 playerid) { int32 card::is_special_summonable(uint8 playerid) {
if(!(data.type & TYPE_MONSTER)) if(!(data.type & TYPE_MONSTER))
return FALSE; return FALSE;
if(pduel->game_field->check_unique_onfield(this, playerid))
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON)) if(is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON))
return FALSE; return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN)) if(is_affected_by_effect(EFFECT_FORBIDDEN))
...@@ -1617,6 +1634,8 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u ...@@ -1617,6 +1634,8 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
if((!nolimit && (current.location & 0x38)) || (!nocheck && (current.location & 0x3))) if((!nolimit && (current.location & 0x38)) || (!nocheck && (current.location & 0x3)))
return FALSE; return FALSE;
} }
if(((sumpos & POS_FACEDOWN) == 0) && pduel->game_field->check_unique_onfield(this, toplayer))
return FALSE;
sumtype |= SUMMON_TYPE_SPECIAL; sumtype |= SUMMON_TYPE_SPECIAL;
if((sumplayer == 0 || sumplayer == 1) && !pduel->game_field->is_player_can_spsummon(reason_effect, sumtype, sumpos, sumplayer, toplayer, this)) if((sumplayer == 0 || sumplayer == 1) && !pduel->game_field->is_player_can_spsummon(reason_effect, sumtype, sumpos, sumplayer, toplayer, this))
return FALSE; return FALSE;
......
...@@ -98,6 +98,10 @@ public: ...@@ -98,6 +98,10 @@ public:
uint32 fieldid_r; uint32 fieldid_r;
uint16 turnid; uint16 turnid;
uint16 turn_counter; uint16 turn_counter;
uint8 unique_pos[2];
uint16 unique_uid;
uint32 unique_code;
effect* unique_effect;
card* equiping_target; card* equiping_target;
card* pre_equip_target; card* pre_equip_target;
card* overlay_target; card* overlay_target;
......
...@@ -122,6 +122,8 @@ int32 effect::is_activateable(uint8 playerid, tevent& e, int32 neglect_cond, int ...@@ -122,6 +122,8 @@ int32 effect::is_activateable(uint8 playerid, tevent& e, int32 neglect_cond, int
if (type & EFFECT_TYPE_ACTIVATE) { if (type & EFFECT_TYPE_ACTIVATE) {
if(handler->current.controler != playerid) if(handler->current.controler != playerid)
return FALSE; return FALSE;
if(pduel->game_field->check_unique_onfield(handler, playerid))
return FALSE;
if(handler->data.type & TYPE_MONSTER) if(handler->data.type & TYPE_MONSTER)
return FALSE; return FALSE;
if(!(handler->data.type & TYPE_COUNTER)) { if(!(handler->data.type & TYPE_COUNTER)) {
......
...@@ -344,6 +344,7 @@ public: ...@@ -344,6 +344,7 @@ public:
#define EFFECT_REVERSE_DECK 294 #define EFFECT_REVERSE_DECK 294
#define EFFECT_REMOVE_BRAINWASHING 295 #define EFFECT_REMOVE_BRAINWASHING 295
#define EFFECT_BP_TWICE 296 #define EFFECT_BP_TWICE 296
#define EFFECT_UNIQUE_CHECK 297
#define EFFECT_MATCH_KILL 300 #define EFFECT_MATCH_KILL 300
#define EVENT_STARTUP 1000 #define EVENT_STARTUP 1000
......
...@@ -1305,6 +1305,35 @@ void field::adjust_disable_check_list() { ...@@ -1305,6 +1305,35 @@ void field::adjust_disable_check_list() {
} while(effects.disable_check_list.size()); } while(effects.disable_check_list.size());
} }
void field::add_unique_card(card* pcard) {
uint8 con = pcard->current.controler;
if(pcard->unique_pos[0])
core.unique_cards[con].insert(pcard);
if(pcard->unique_pos[1])
core.unique_cards[1 - con].insert(pcard);
pcard->unique_uid = infos.copy_id++;
}
void field::remove_unique_card(card* pcard) {
uint8 con = pcard->current.controler;
if(pcard->unique_pos[0])
core.unique_cards[con].erase(pcard);
if(pcard->unique_pos[1])
core.unique_cards[1 - con].erase(pcard);
}
effect* field::check_unique_onfield(card* pcard, uint8 controler) {
if(!pcard->unique_code)
return 0;
for(auto iter = core.unique_cards[controler].begin(); iter != core.unique_cards[controler].end(); ++iter) {
card* ucard = *iter;
if((ucard != pcard) && ucard->is_position(POS_FACEUP) && ucard->unique_code == pcard->unique_code
&& (!(pcard->current.location & LOCATION_ONFIELD) || pcard->is_position(POS_FACEDOWN) || (ucard->unique_uid < pcard->unique_uid)))
return pcard->unique_effect;
}
return 0;
}
int32 field::check_lp_cost(uint8 playerid, uint32 lp) { int32 field::check_lp_cost(uint8 playerid, uint32 lp) {
effect_set eset; effect_set eset;
int32 val = lp; int32 val = lp;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <list> #include <list>
#include <array> #include <array>
#include <unordered_map> #include <unordered_map>
#include <unordered_set>
class card; class card;
struct card_data; struct card_data;
...@@ -202,6 +203,7 @@ struct processor { ...@@ -202,6 +203,7 @@ struct processor {
event_list delayed_tev; event_list delayed_tev;
event_list delayed_ntev; event_list delayed_ntev;
std::unordered_map<card*, uint32> readjust_map; std::unordered_map<card*, uint32> readjust_map;
std::unordered_set<card*> unique_cards[2];
ptr temp_var[4]; ptr temp_var[4];
uint32 global_flag; uint32 global_flag;
uint16 pre_field[5]; uint16 pre_field[5];
...@@ -329,7 +331,10 @@ public: ...@@ -329,7 +331,10 @@ public:
void update_disable_check_list(effect* peffect); void update_disable_check_list(effect* peffect);
void add_to_disable_check_list(card* pcard); void add_to_disable_check_list(card* pcard);
void adjust_disable_check_list(); void adjust_disable_check_list();
void add_unique_card(card* pcard);
void remove_unique_card(card* pcard);
effect* check_unique_onfield(card* pcard, uint8 controler);
int32 check_lp_cost(uint8 playerid, uint32 cost); int32 check_lp_cost(uint8 playerid, uint32 cost);
void save_lp_cost(); void save_lp_cost();
void restore_lp_cost(); void restore_lp_cost();
......
...@@ -190,6 +190,8 @@ static const struct luaL_Reg cardlib[] = { ...@@ -190,6 +190,8 @@ static const struct luaL_Reg cardlib[] = {
{ "GetAttackableTarget", scriptlib::card_get_attackable_target }, { "GetAttackableTarget", scriptlib::card_get_attackable_target },
{ "SetHint", scriptlib::card_set_hint }, { "SetHint", scriptlib::card_set_hint },
{ "ReverseInDeck", scriptlib::card_reverse_in_deck }, { "ReverseInDeck", scriptlib::card_reverse_in_deck },
{ "SetUniqueOnField", scriptlib::card_set_unique_onfield },
{ "CheckUniqueOnField", scriptlib::card_check_unique_onfield },
{ NULL, NULL } { NULL, NULL }
}; };
......
...@@ -1880,3 +1880,29 @@ int32 scriptlib::card_reverse_in_deck(lua_State *L) { ...@@ -1880,3 +1880,29 @@ int32 scriptlib::card_reverse_in_deck(lua_State *L) {
} }
return 0; return 0;
} }
int32 scriptlib::card_set_unique_onfield(lua_State *L) {
check_param_count(L, 4);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
pcard->unique_pos[0] = lua_tointeger(L, 2);
pcard->unique_pos[1] = lua_tointeger(L, 3);
pcard->unique_code = lua_tointeger(L, 4);
effect* peffect = pcard->pduel->new_effect();
peffect->owner = pcard;
peffect->type = EFFECT_TYPE_SINGLE;
peffect->code = EFFECT_UNIQUE_CHECK;
peffect->flag = EFFECT_FLAG_COPY_INHERIT;
pcard->add_effect(peffect);
pcard->unique_effect = peffect;
if(pcard->current.location & LOCATION_ONFIELD)
pcard->pduel->game_field->add_unique_card(pcard);
return 0;
}
int32 scriptlib::card_check_unique_onfield(lua_State *L) {
check_param_count(L, 2);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
uint32 check_player = lua_tointeger(L, 2);
lua_pushboolean(L, pcard->pduel->game_field->check_unique_onfield(pcard, check_player) ? 0 : 1);
return 1;
}
...@@ -1100,6 +1100,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc, ...@@ -1100,6 +1100,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
if(!is_player_can_summon(SUMMON_TYPE_DUAL, sumplayer, target)) if(!is_player_can_summon(SUMMON_TYPE_DUAL, sumplayer, target))
return TRUE; return TRUE;
} }
if(check_unique_onfield(target, sumplayer))
return TRUE;
if(target->is_affected_by_effect(EFFECT_CANNOT_SUMMON)) if(target->is_affected_by_effect(EFFECT_CANNOT_SUMMON))
return TRUE; return TRUE;
core.summon_depth++; core.summon_depth++;
...@@ -1447,6 +1449,8 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) { ...@@ -1447,6 +1449,8 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
return TRUE; return TRUE;
if(!(target->current.position & POS_FACEDOWN)) if(!(target->current.position & POS_FACEDOWN))
return TRUE; return TRUE;
if(check_unique_onfield(target, sumplayer))
return TRUE;
effect_set eset; effect_set eset;
target->filter_effect(EFFECT_FLIPSUMMON_COST, &eset); target->filter_effect(EFFECT_FLIPSUMMON_COST, &eset);
for(int32 i = 0; i < eset.count; ++i) { for(int32 i = 0; i < eset.count; ++i) {
...@@ -1844,6 +1848,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) { ...@@ -1844,6 +1848,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
case 0: { case 0: {
if(!(target->data.type & TYPE_MONSTER)) if(!(target->data.type & TYPE_MONSTER))
return FALSE; return FALSE;
if(check_unique_onfield(target, sumplayer))
return TRUE;
if(target->is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON)) if(target->is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON))
return FALSE; return FALSE;
if(target->current.location & (LOCATION_GRAVE + LOCATION_REMOVED) && !target->is_status(STATUS_REVIVE_LIMIT) && target->is_affected_by_effect(EFFECT_REVIVE_LIMIT)) if(target->current.location & (LOCATION_GRAVE + LOCATION_REMOVED) && !target->is_status(STATUS_REVIVE_LIMIT) && target->is_affected_by_effect(EFFECT_REVIVE_LIMIT))
...@@ -2030,6 +2036,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) { ...@@ -2030,6 +2036,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
result = FALSE; result = FALSE;
} }
if(!result || (target->current.location == LOCATION_MZONE) if(!result || (target->current.location == LOCATION_MZONE)
|| check_unique_onfield(target, playerid)
|| !is_player_can_spsummon(core.reason_effect, target->summon_type, positions, target->summon_player, playerid, target) || !is_player_can_spsummon(core.reason_effect, target->summon_type, positions, target->summon_player, playerid, target)
|| target->is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON) || target->is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON)
|| get_useable_count(playerid, LOCATION_MZONE, target->summon_player, LOCATION_REASON_TOFIELD) <= 0 || get_useable_count(playerid, LOCATION_MZONE, target->summon_player, LOCATION_REASON_TOFIELD) <= 0
......
...@@ -4679,7 +4679,8 @@ int32 field::adjust_step(uint16 step) { ...@@ -4679,7 +4679,8 @@ int32 field::adjust_step(uint16 step) {
for(uint8 p = 0; p < 2; ++p) { for(uint8 p = 0; p < 2; ++p) {
for(uint8 i = 0; i < 5; ++i) { for(uint8 i = 0; i < 5; ++i) {
card* pcard = player[tp].list_mzone[i]; card* pcard = player[tp].list_mzone[i];
if(pcard && pcard->is_position(POS_FACEUP) && (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))) { if(pcard && pcard->is_position(POS_FACEUP) && ((!pcard->is_status(STATUS_DISABLED) && (peffect = check_unique_onfield(pcard, tp)))
|| (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY)))) {
core.destroy_set.insert(pcard); core.destroy_set.insert(pcard);
pcard->current.reason_effect = peffect; pcard->current.reason_effect = peffect;
pcard->current.reason_player = peffect->get_handler_player(); pcard->current.reason_player = peffect->get_handler_player();
...@@ -4687,7 +4688,8 @@ int32 field::adjust_step(uint16 step) { ...@@ -4687,7 +4688,8 @@ int32 field::adjust_step(uint16 step) {
} }
for(uint8 i = 0; i < 6; ++i) { for(uint8 i = 0; i < 6; ++i) {
card* pcard = player[tp].list_szone[i]; card* pcard = player[tp].list_szone[i];
if(pcard && pcard->is_position(POS_FACEUP) && (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))) { if(pcard && pcard->is_position(POS_FACEUP) && ((!pcard->is_status(STATUS_DISABLED) && (peffect = check_unique_onfield(pcard, tp)))
|| (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY)))) {
core.destroy_set.insert(pcard); core.destroy_set.insert(pcard);
pcard->current.reason_effect = peffect; pcard->current.reason_effect = peffect;
pcard->current.reason_player = peffect->get_handler_player(); pcard->current.reason_player = peffect->get_handler_player();
......
...@@ -192,6 +192,9 @@ public: ...@@ -192,6 +192,9 @@ public:
static int32 card_get_attackable_target(lua_State *L); static int32 card_get_attackable_target(lua_State *L);
static int32 card_set_hint(lua_State *L); static int32 card_set_hint(lua_State *L);
static int32 card_reverse_in_deck(lua_State *L); static int32 card_reverse_in_deck(lua_State *L);
static int32 card_set_unique_onfield(lua_State *L);
static int32 card_check_unique_onfield(lua_State *L);
//Effect functions //Effect functions
static int32 effect_new(lua_State *L); static int32 effect_new(lua_State *L);
static int32 effect_newex(lua_State *L); static int32 effect_newex(lua_State *L);
......
--地縛神 Aslla piscu --地縛神 Aslla piscu
function c10875327.initial_effect(c) function c10875327.initial_effect(c)
--only 1 can exists c:SetUniqueOnField(1,1,10000000)
local e1=Effect.CreateEffect(c) --
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c10875327.excon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c10875327.splimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -46,23 +33,12 @@ function c10875327.initial_effect(c) ...@@ -46,23 +33,12 @@ function c10875327.initial_effect(c)
e7:SetOperation(c10875327.desop) e7:SetOperation(c10875327.desop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c10875327.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x21) and (fid==nil or c:GetFieldID()<fid)
end
function c10875327.excon(e)
return Duel.IsExistingMatchingCard(c10875327.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c10875327.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c10875327.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c10875327.sdcon(e) function c10875327.sdcon(e)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c10875327.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end end
function c10875327.descon(e,tp,eg,ep,ev,re,r,rp) function c10875327.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--アマゾネスペット虎 --アマゾネスペット虎
function c10979723.initial_effect(c) function c10979723.initial_effect(c)
c:SetUniqueOnField(1,0,10979723)
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -17,28 +18,6 @@ function c10979723.initial_effect(c) ...@@ -17,28 +18,6 @@ function c10979723.initial_effect(c)
e2:SetTarget(c10979723.atlimit) e2:SetTarget(c10979723.atlimit)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c10979723.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(c10979723.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c10979723.descon)
c:RegisterEffect(e6)
end end
function c10979723.val(e,c) function c10979723.val(e,c)
return Duel.GetMatchingGroupCount(c10979723.filter,c:GetControler(),LOCATION_MZONE,0,nil)*400 return Duel.GetMatchingGroupCount(c10979723.filter,c:GetControler(),LOCATION_MZONE,0,nil)*400
...@@ -49,18 +28,3 @@ end ...@@ -49,18 +28,3 @@ end
function c10979723.atlimit(e,c) function c10979723.atlimit(e,c)
return c:IsSetCard(0x4) and c~=e:GetHandler() return c:IsSetCard(0x4) and c~=e:GetHandler()
end end
function c10979723.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==10979723 and (fid==nil or c:GetFieldID()<fid)
end
function c10979723.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c10979723.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c10979723.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c10979723.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c10979723.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c10979723.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--Noble Arms - Gallatin --Noble Arms - Gallatin
function c14745409.initial_effect(c) function c14745409.initial_effect(c)
c:SetUniqueOnField(1,0,14745409)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c14745409.condition)
e1:SetTarget(c14745409.target) e1:SetTarget(c14745409.target)
e1:SetOperation(c14745409.operation) e1:SetOperation(c14745409.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -47,17 +47,10 @@ function c14745409.initial_effect(c) ...@@ -47,17 +47,10 @@ function c14745409.initial_effect(c)
end end
function c14745409.eqlimit(e,c) function c14745409.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR) return c:IsRace(RACE_WARRIOR)
and not Duel.IsExistingMatchingCard(c14745409.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c14745409.cfilter(c)
return c:IsFaceup() and c:IsCode(14745409)
end end
function c14745409.eqfilter1(c) function c14745409.eqfilter1(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end end
function c14745409.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c14745409.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c14745409.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14745409.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14745409.eqfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14745409.eqfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14745409.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c14745409.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
...@@ -66,9 +59,10 @@ function c14745409.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,9 +59,10 @@ function c14745409.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c14745409.operation(e,tp,eg,ep,ev,re,r,rp) function c14745409.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,e:GetHandler(),tc) Duel.Equip(tp,c,tc)
end end
end end
function c14745409.atkcon(e,tp,eg,ep,ev,re,r,rp) function c14745409.atkcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -95,7 +89,7 @@ function c14745409.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +89,7 @@ function c14745409.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function c14745409.eqcon(e,tp,eg,ep,ev,re,r,rp) function c14745409.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp)
end end
function c14745409.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) function c14745409.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,14745409)==0 end if chk==0 then return Duel.GetFlagEffect(tp,14745409)==0 end
......
--地縛神 Uru --地縛神 Uru
function c15187079.initial_effect(c) function c15187079.initial_effect(c)
--only 1 can exists c:SetUniqueOnField(1,1,10000000)
local e1=Effect.CreateEffect(c) --
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c15187079.excon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c15187079.splimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -48,23 +35,12 @@ function c15187079.initial_effect(c) ...@@ -48,23 +35,12 @@ function c15187079.initial_effect(c)
e7:SetOperation(c15187079.ctop) e7:SetOperation(c15187079.ctop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c15187079.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x21) and (fid==nil or c:GetFieldID()<fid)
end
function c15187079.excon(e)
return Duel.IsExistingMatchingCard(c15187079.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c15187079.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c15187079.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c15187079.sdcon(e) function c15187079.sdcon(e)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c15187079.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end end
function c15187079.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) function c15187079.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end
......
--レプティレス·ヴァースキ --レプティレス·ヴァースキ
function c16886617.initial_effect(c) function c16886617.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
c:SetUniqueOnField(1,1,16886617)
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE) e1:SetValue(0)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -17,18 +18,6 @@ function c16886617.initial_effect(c) ...@@ -17,18 +18,6 @@ function c16886617.initial_effect(c)
e2:SetCondition(c16886617.spcon) e2:SetCondition(c16886617.spcon)
e2:SetOperation(c16886617.spop) e2:SetOperation(c16886617.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
e3:SetCondition(c16886617.excon)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c16886617.sdcon)
c:RegisterEffect(e4)
--destroy --destroy
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(16886617,0)) e5:SetDescription(aux.Stringid(16886617,0))
...@@ -41,14 +30,11 @@ function c16886617.initial_effect(c) ...@@ -41,14 +30,11 @@ function c16886617.initial_effect(c)
e5:SetOperation(c16886617.desop) e5:SetOperation(c16886617.desop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c16886617.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==16886617 and (fid==nil or c:GetFieldID()<fid)
end
function c16886617.rfilter(c) function c16886617.rfilter(c)
return c:IsFaceup() and c:GetAttack()==0 and c:IsReleasable() return c:IsFaceup() and c:GetAttack()==0 and c:IsReleasable()
end end
function c16886617.spcon(e,c) function c16886617.spcon(e,c)
if c==nil then return not Duel.IsExistingMatchingCard(c16886617.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if c==nil then return true end
return Duel.IsExistingMatchingCard(c16886617.rfilter,0,LOCATION_MZONE,LOCATION_MZONE,2,nil) return Duel.IsExistingMatchingCard(c16886617.rfilter,0,LOCATION_MZONE,LOCATION_MZONE,2,nil)
end end
function c16886617.spop(e,tp,eg,ep,ev,re,r,rp,c) function c16886617.spop(e,tp,eg,ep,ev,re,r,rp,c)
...@@ -56,13 +42,6 @@ function c16886617.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -56,13 +42,6 @@ function c16886617.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c16886617.rfilter,0,LOCATION_MZONE,LOCATION_MZONE,2,2,nil) local g=Duel.SelectMatchingCard(tp,c16886617.rfilter,0,LOCATION_MZONE,LOCATION_MZONE,2,2,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c16886617.excon(e)
return Duel.IsExistingMatchingCard(c16886617.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c16886617.sdcon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c16886617.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c:GetFieldID())
end
function c16886617.desfilter(c) function c16886617.desfilter(c)
return c:IsFaceup() and c:IsDestructable() return c:IsFaceup() and c:IsDestructable()
end end
......
--神禽王アレクトール --神禽王アレクトール
function c17573739.initial_effect(c) function c17573739.initial_effect(c)
c:SetUniqueOnField(1,1,17573739)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -18,26 +19,6 @@ function c17573739.initial_effect(c) ...@@ -18,26 +19,6 @@ function c17573739.initial_effect(c)
e2:SetTarget(c17573739.distg) e2:SetTarget(c17573739.distg)
e2:SetOperation(c17573739.disop) e2:SetOperation(c17573739.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c17573739.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(c17573739.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c17573739.descon)
c:RegisterEffect(e6)
end end
function c17573739.spfilter1(c,tp) function c17573739.spfilter1(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c17573739.spfilter2,tp,0,LOCATION_MZONE,1,c,c:GetAttribute()) return c:IsFaceup() and Duel.IsExistingMatchingCard(c17573739.spfilter2,tp,0,LOCATION_MZONE,1,c,c:GetAttribute())
...@@ -49,7 +30,6 @@ function c17573739.spcon(e,c) ...@@ -49,7 +30,6 @@ function c17573739.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c17573739.exfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c17573739.spfilter1,tp,0,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c17573739.spfilter1,tp,0,LOCATION_MZONE,1,nil,tp)
end end
function c17573739.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17573739.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -81,18 +61,3 @@ function c17573739.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,18 +61,3 @@ function c17573739.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c17573739.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==17573739 and (fid==nil or c:GetFieldID()<fid)
end
function c17573739.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c17573739.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c17573739.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c17573739.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c17573739.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c17573739.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
--ZW-玄武絶対聖盾 --ZW-玄武絶対聖盾
function c18865703.initial_effect(c) function c18865703.initial_effect(c)
c:SetUniqueOnField(1,0,18865703)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(18865703,0)) e1:SetDescription(aux.Stringid(18865703,0))
...@@ -24,29 +25,9 @@ function c18865703.initial_effect(c) ...@@ -24,29 +25,9 @@ function c18865703.initial_effect(c)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--only 1 can exists
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetCondition(c18865703.excon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(c18865703.splimit)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c18865703.descon)
c:RegisterEffect(e7)
end end
function c18865703.eqcon(e,tp,eg,ep,ev,re,r,rp) function c18865703.eqcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c18865703.exfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) return e:GetHandler():CheckUniqueOnField(tp)
end end
function c18865703.filter(c) function c18865703.filter(c)
return c:IsFaceup() and c:IsSetCard(0x7f) return c:IsFaceup() and c:IsSetCard(0x7f)
...@@ -62,7 +43,7 @@ function c18865703.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +43,7 @@ function c18865703.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
...@@ -101,19 +82,3 @@ function c18865703.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,19 +82,3 @@ function c18865703.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end end
end end
function c18865703.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==18865703 and (fid==nil or c:GetFieldID()<fid)
end
function c18865703.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c18865703.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c18865703.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c18865703.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c18865703.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c18865703.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--ガガガマジシャン --ガガガマジシャン
function c26082117.initial_effect(c) function c26082117.initial_effect(c)
c:SetUniqueOnField(1,0,26082117)
--lv change --lv change
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26082117,0)) e1:SetDescription(aux.Stringid(26082117,0))
...@@ -16,26 +17,6 @@ function c26082117.initial_effect(c) ...@@ -16,26 +17,6 @@ function c26082117.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c26082117.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(c26082117.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c26082117.descon)
c:RegisterEffect(e6)
end end
function c26082117.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c26082117.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -61,18 +42,3 @@ function c26082117.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,18 +42,3 @@ function c26082117.op(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c26082117.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==26082117 and (fid==nil or c:GetFieldID()<fid)
end
function c26082117.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c26082117.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c26082117.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c26082117.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c26082117.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c26082117.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
...@@ -19,12 +19,12 @@ function c31563350.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,12 +19,12 @@ function c31563350.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c31563350.filter(c) function c31563350.filter(c,tp)
return c:IsRace(RACE_WARRIOR) return c:IsRace(RACE_WARRIOR) and c:CheckUniqueOnField(tp)
end end
function c31563350.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c31563350.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c31563350.filter,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(c31563350.filter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_HAND)
end end
function c31563350.eqop(e,tp,eg,ep,ev,re,r,rp) function c31563350.eqop(e,tp,eg,ep,ev,re,r,rp)
......
--地縛神 Cusillu --地縛神 Cusillu
function c33537328.initial_effect(c) function c33537328.initial_effect(c)
--only 1 can exists c:SetUniqueOnField(1,1,10000000)
local e1=Effect.CreateEffect(c) --
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c33537328.excon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c33537328.splimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -44,23 +31,12 @@ function c33537328.initial_effect(c) ...@@ -44,23 +31,12 @@ function c33537328.initial_effect(c)
e7:SetTarget(c33537328.desreptg) e7:SetTarget(c33537328.desreptg)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c33537328.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x21) and (fid==nil or c:GetFieldID()<fid)
end
function c33537328.excon(e)
return Duel.IsExistingMatchingCard(c33537328.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c33537328.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c33537328.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c33537328.sdcon(e) function c33537328.sdcon(e)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c33537328.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end end
function c33537328.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c33537328.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
--ハネクリボー LV9 --ハネクリボー LV9
function c33776734.initial_effect(c) function c33776734.initial_effect(c)
c:SetUniqueOnField(1,0,33776734)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33776734,0)) e1:SetDescription(aux.Stringid(33776734,0))
...@@ -31,26 +32,6 @@ function c33776734.initial_effect(c) ...@@ -31,26 +32,6 @@ function c33776734.initial_effect(c)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_SET_DEFENCE) e4:SetCode(EFFECT_SET_DEFENCE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_SUMMON)
e5:SetCondition(c33776734.excon)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetCode(EFFECT_SPSUMMON_CONDITION)
e7:SetValue(c33776734.splimit)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_SELF_DESTROY)
e8:SetCondition(c33776734.descon)
c:RegisterEffect(e8)
end end
c33776734.lvupcount=1 c33776734.lvupcount=1
c33776734.lvup={33776734} c33776734.lvup={33776734}
...@@ -75,17 +56,3 @@ end ...@@ -75,17 +56,3 @@ end
function c33776734.val(e,c) function c33776734.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_SPELL)*500 return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_SPELL)*500
end end
function c33776734.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==33776734 and (fid==nil or c:GetFieldID()<fid)
end
function c33776734.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c33776734.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c33776734.splimit(e,se,sp,st,spos,tgp)
return not Duel.IsExistingMatchingCard(c33776734.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c33776734.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c33776734.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--太陽風帆船 --太陽風帆船
function c33911264.initial_effect(c) function c33911264.initial_effect(c)
c:SetUniqueOnField(1,1,33911264)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -20,33 +21,12 @@ function c33911264.initial_effect(c) ...@@ -20,33 +21,12 @@ function c33911264.initial_effect(c)
e2:SetCondition(c33911264.lvcon) e2:SetCondition(c33911264.lvcon)
e2:SetOperation(c33911264.lvop) e2:SetOperation(c33911264.lvop)
c:RegisterEffect(e2) 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 end
function c33911264.spcon(e,c) function c33911264.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c33911264.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function c33911264.spop(e,tp,eg,ep,ev,re,r,rp,c) function c33911264.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -75,18 +55,3 @@ function c33911264.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,18 +55,3 @@ function c33911264.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end 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
--超魔神イド --超魔神イド
function c35984222.initial_effect(c) function c35984222.initial_effect(c)
c:SetUniqueOnField(1,0,35984222)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
...@@ -34,26 +35,6 @@ function c35984222.initial_effect(c) ...@@ -34,26 +35,6 @@ function c35984222.initial_effect(c)
local e5=e3:Clone() local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_MSET) e5:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--only 1 can exists
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetCondition(c35984222.excon)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e8:SetCode(EFFECT_SPSUMMON_CONDITION)
e8:SetValue(c35984222.splimit)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_SELF_DESTROY)
e9:SetCondition(c35984222.descon)
c:RegisterEffect(e9)
end end
function c35984222.spr(e,tp,eg,ep,ev,re,r,rp) function c35984222.spr(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -77,18 +58,3 @@ function c35984222.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,18 +58,3 @@ function c35984222.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
function c35984222.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==35984222 and (fid==nil or c:GetFieldID()<fid)
end
function c35984222.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c35984222.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c35984222.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c35984222.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c35984222.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c35984222.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--RAI-JIN --RAI-JIN
function c37829468.initial_effect(c) function c37829468.initial_effect(c)
c:SetUniqueOnField(1,1,37829468)
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -20,26 +21,6 @@ function c37829468.initial_effect(c) ...@@ -20,26 +21,6 @@ function c37829468.initial_effect(c)
e2:SetTarget(c37829468.destg) e2:SetTarget(c37829468.destg)
e2:SetOperation(c37829468.desop) e2:SetOperation(c37829468.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c37829468.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(c37829468.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c37829468.descon)
c:RegisterEffect(e6)
end end
function c37829468.atktg(e,c) function c37829468.atktg(e,c)
return c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsAttribute(ATTRIBUTE_LIGHT)
...@@ -63,18 +44,3 @@ function c37829468.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,18 +44,3 @@ function c37829468.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c37829468.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==37829468 and (fid==nil or c:GetFieldID()<fid)
end
function c37829468.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c37829468.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c37829468.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c37829468.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c37829468.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c37829468.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
--地縛神 Wiraqocha Rasca --地縛神 Wiraqocha Rasca
function c41181774.initial_effect(c) function c41181774.initial_effect(c)
--only 1 can exists c:SetUniqueOnField(1,1,10000000)
local e1=Effect.CreateEffect(c) --
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c41181774.excon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c41181774.splimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -46,23 +33,12 @@ function c41181774.initial_effect(c) ...@@ -46,23 +33,12 @@ function c41181774.initial_effect(c)
e7:SetOperation(c41181774.hdop) e7:SetOperation(c41181774.hdop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c41181774.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x21) and (fid==nil or c:GetFieldID()<fid)
end
function c41181774.excon(e)
return Duel.IsExistingMatchingCard(c41181774.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c41181774.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c41181774.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c41181774.sdcon(e) function c41181774.sdcon(e)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c41181774.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end end
function c41181774.hdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c41181774.hdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToDeck() end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToDeck() end
......
--ZW-雷神猛虎剣 --ZW-雷神猛虎剣
function c45082499.initial_effect(c) function c45082499.initial_effect(c)
c:SetUniqueOnField(1,0,45082499)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45082499,0)) e1:SetDescription(aux.Stringid(45082499,0))
...@@ -27,29 +28,9 @@ function c45082499.initial_effect(c) ...@@ -27,29 +28,9 @@ function c45082499.initial_effect(c)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetValue(c45082499.repval) e3:SetValue(c45082499.repval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--only 1 can exists
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetCondition(c45082499.excon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(c45082499.splimit)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c45082499.descon)
c:RegisterEffect(e7)
end end
function c45082499.eqcon(e,tp,eg,ep,ev,re,r,rp) function c45082499.eqcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c45082499.exfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) return e:GetHandler():CheckUniqueOnField(tp)
end end
function c45082499.filter(c) function c45082499.filter(c)
return c:IsFaceup() and c:IsSetCard(0x7f) return c:IsFaceup() and c:IsSetCard(0x7f)
...@@ -65,7 +46,7 @@ function c45082499.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +46,7 @@ function c45082499.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
...@@ -93,19 +74,3 @@ end ...@@ -93,19 +74,3 @@ end
function c45082499.repval(e,re,r,rp) function c45082499.repval(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 return bit.band(r,REASON_EFFECT)~=0
end end
function c45082499.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==45082499 and (fid==nil or c:GetFieldID()<fid)
end
function c45082499.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c45082499.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c45082499.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c45082499.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c45082499.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c45082499.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--地縛神 Ccapac Apu --地縛神 Ccapac Apu
function c46263076.initial_effect(c) function c46263076.initial_effect(c)
--only 1 can exists c:SetUniqueOnField(1,1,10000000)
local e1=Effect.CreateEffect(c) --
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c46263076.excon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c46263076.splimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -45,23 +32,12 @@ function c46263076.initial_effect(c) ...@@ -45,23 +32,12 @@ function c46263076.initial_effect(c)
e7:SetOperation(c46263076.damop) e7:SetOperation(c46263076.damop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c46263076.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x21) and (fid==nil or c:GetFieldID()<fid)
end
function c46263076.excon(e)
return Duel.IsExistingMatchingCard(c46263076.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c46263076.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c46263076.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c46263076.sdcon(e) function c46263076.sdcon(e)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c46263076.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end end
function c46263076.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c46263076.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--先史遺産トゥーラ・ガーディアン --先史遺産トゥーラ・ガーディアン
function c5291803.initial_effect(c) function c5291803.initial_effect(c)
c:SetUniqueOnField(1,0,5291803)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -8,26 +9,6 @@ function c5291803.initial_effect(c) ...@@ -8,26 +9,6 @@ function c5291803.initial_effect(c)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c5291803.spcon) e1:SetCondition(c5291803.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--count limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c5291803.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(c5291803.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c5291803.descon)
c:RegisterEffect(e6)
end end
function c5291803.cfilter(tc) function c5291803.cfilter(tc)
return tc and tc:IsFaceup() return tc and tc:IsFaceup()
...@@ -37,20 +18,4 @@ function c5291803.spcon(e,c) ...@@ -37,20 +18,4 @@ function c5291803.spcon(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (c5291803.cfilter(Duel.GetFieldCard(tp,LOCATION_SZONE,5)) or c5291803.cfilter(Duel.GetFieldCard(1-tp,LOCATION_SZONE,5))) and (c5291803.cfilter(Duel.GetFieldCard(tp,LOCATION_SZONE,5)) or c5291803.cfilter(Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)))
and not Duel.IsExistingMatchingCard(c5291803.exfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c5291803.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==5291803 and (fid==nil or c:GetFieldID()<fid)
end
function c5291803.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c5291803.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c5291803.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c5291803.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c5291803.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c5291803.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end end
--レッド·ダストン --レッド·ダストン
function c61019812.initial_effect(c) function c61019812.initial_effect(c)
c:SetUniqueOnField(1,0,61019812)
--cannot release --cannot release
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -30,26 +31,6 @@ function c61019812.initial_effect(c) ...@@ -30,26 +31,6 @@ function c61019812.initial_effect(c)
e6:SetTarget(c61019812.dmtg) e6:SetTarget(c61019812.dmtg)
e6:SetOperation(c61019812.dmop) e6:SetOperation(c61019812.dmop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_SUMMON)
e7:SetCondition(c61019812.excon)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(EFFECT_SPSUMMON_CONDITION)
e9:SetValue(c61019812.splimit)
c:RegisterEffect(e9)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_SELF_DESTROY)
e10:SetCondition(c61019812.descon)
c:RegisterEffect(e10)
end end
function c61019812.dmcon(e,tp,eg,ep,ev,re,r,rp) function c61019812.dmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -66,18 +47,3 @@ function c61019812.dmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,18 +47,3 @@ function c61019812.dmop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
function c61019812.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==61019812 and (fid==nil or c:GetFieldID()<fid)
end
function c61019812.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c61019812.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c61019812.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c61019812.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c61019812.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c61019812.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--墓守の長 --墓守の長
function c62473983.initial_effect(c) function c62473983.initial_effect(c)
c:SetUniqueOnField(1,0,62473983)
--immune to necro valley --immune to necro valley
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -8,49 +9,15 @@ function c62473983.initial_effect(c) ...@@ -8,49 +9,15 @@ function c62473983.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--only 1 can exist --summon success
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EFFECT_CANNOT_SUMMON) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(c62473983.excon) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(c62473983.spcon)
e2:SetTarget(c62473983.sptg)
e2:SetOperation(c62473983.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(c62473983.splimit)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SELF_DESTROY)
e5:SetCondition(c62473983.descon)
c:RegisterEffect(e5)
--summon success
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetCondition(c62473983.spcon)
e6:SetTarget(c62473983.sptg)
e6:SetOperation(c62473983.spop)
c:RegisterEffect(e6)
end
function c62473983.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==62473983 and (fid==nil or c:GetFieldID()<fid)
end
function c62473983.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c62473983.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c62473983.splimit(e,se,sp,st,spos,tgp)
return not Duel.IsExistingMatchingCard(c62473983.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c62473983.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c62473983.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end end
function c62473983.spcon(e,tp,eg,ep,ev,re,r,rp) function c62473983.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),0xff000000)==SUMMON_TYPE_ADVANCE return bit.band(e:GetHandler():GetSummonType(),0xff000000)==SUMMON_TYPE_ADVANCE
......
--稲荷火 --稲荷火
function c62953041.initial_effect(c) function c62953041.initial_effect(c)
c:SetUniqueOnField(1,0,62953041)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -9,42 +10,22 @@ function c62953041.initial_effect(c) ...@@ -9,42 +10,22 @@ function c62953041.initial_effect(c)
e1:SetCondition(c62953041.hspcon) e1:SetCondition(c62953041.hspcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetOperation(c62953041.spreg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62953041,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCode(EVENT_TO_GRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetOperation(c62953041.spreg)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c62953041.spcon)
e2:SetTarget(c62953041.sptg)
e2:SetOperation(c62953041.spop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetDescription(aux.Stringid(62953041,0))
e3:SetCode(EFFECT_CANNOT_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCondition(c62953041.excon) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c62953041.spcon)
e3:SetTarget(c62953041.sptg)
e3:SetOperation(c62953041.spop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3) 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(c62953041.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c62953041.descon)
c:RegisterEffect(e6)
end end
function c62953041.filter(c) function c62953041.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
...@@ -53,7 +34,6 @@ function c62953041.hspcon(e,c) ...@@ -53,7 +34,6 @@ function c62953041.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c62953041.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c62953041.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(c62953041.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end end
function c62953041.spreg(e,tp,eg,ep,ev,re,r,rp) function c62953041.spreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -82,18 +62,3 @@ function c62953041.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,18 +62,3 @@ function c62953041.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c62953041.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==62953041 and (fid==nil or c:GetFieldID()<fid)
end
function c62953041.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c62953041.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c62953041.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c62953041.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c62953041.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c62953041.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--エーリアン·リベンジャー --エーリアン·リベンジャー
function c63253763.initial_effect(c) function c63253763.initial_effect(c)
c:SetUniqueOnField(1,0,63253763)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -26,31 +27,10 @@ function c63253763.initial_effect(c) ...@@ -26,31 +27,10 @@ function c63253763.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c63253763.adval) e3:SetOperation(c63253763.adval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--only 1 can exists
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetCondition(c63253763.excon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(c63253763.splimit)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c63253763.descon)
c:RegisterEffect(e7)
end end
function c63253763.spcon(e,c) function c63253763.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c63253763.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0xe,2,REASON_COST) and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0xe,2,REASON_COST)
end end
function c63253763.spop(e,tp,eg,ep,ev,re,r,rp,c) function c63253763.spop(e,tp,eg,ep,ev,re,r,rp,c)
...@@ -86,17 +66,3 @@ function c63253763.adval(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,17 +66,3 @@ function c63253763.adval(e,tp,eg,ep,ev,re,r,rp)
if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c63253763.addown(a,e) end if a:GetCounter(0xe)>0 and d:IsSetCard(0xc) then c63253763.addown(a,e) end
if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c63253763.addown(d,e) end if d:GetCounter(0xe)>0 and a:IsSetCard(0xc) then c63253763.addown(d,e) end
end end
function c63253763.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==63253763 and (fid==nil or c:GetFieldID()<fid)
end
function c63253763.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c63253763.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c63253763.splimit(e,se,sp,st,spos,tgp)
return not Duel.IsExistingMatchingCard(c63253763.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c63253763.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c63253763.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--ドラゴン·アイス --ドラゴン·アイス
function c64262809.initial_effect(c) function c64262809.initial_effect(c)
c:SetUniqueOnField(1,1,64262809)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64262809,0)) e1:SetDescription(aux.Stringid(64262809,0))
...@@ -13,26 +14,6 @@ function c64262809.initial_effect(c) ...@@ -13,26 +14,6 @@ function c64262809.initial_effect(c)
e1:SetTarget(c64262809.sptg) e1:SetTarget(c64262809.sptg)
e1:SetOperation(c64262809.spop) e1:SetOperation(c64262809.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c64262809.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(c64262809.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c64262809.descon)
c:RegisterEffect(e6)
end end
function c64262809.cfilter(c,tp) function c64262809.cfilter(c,tp)
return c:GetSummonPlayer()==1-tp return c:GetSummonPlayer()==1-tp
...@@ -56,18 +37,3 @@ function c64262809.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,18 +37,3 @@ function c64262809.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c64262809.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==64262809 and (fid==nil or c:GetFieldID()<fid)
end
function c64262809.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c64262809.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c64262809.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c64262809.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c64262809.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c64262809.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
--キング·オブ·ビースト --キング·オブ·ビースト
function c67757079.initial_effect(c) function c67757079.initial_effect(c)
c:SetUniqueOnField(1,0,67757079)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67757079,0)) e1:SetDescription(aux.Stringid(67757079,0))
...@@ -11,26 +12,6 @@ function c67757079.initial_effect(c) ...@@ -11,26 +12,6 @@ function c67757079.initial_effect(c)
e1:SetTarget(c67757079.sptg) e1:SetTarget(c67757079.sptg)
e1:SetOperation(c67757079.spop) e1:SetOperation(c67757079.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--only 1 can exists
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetCondition(c67757079.excon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(c67757079.splimit)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SELF_DESTROY)
e5:SetCondition(c67757079.descon)
c:RegisterEffect(e5)
end end
function c67757079.cfilter(c) function c67757079.cfilter(c)
return c:IsFaceup() and c:GetCode()==94878265 return c:IsFaceup() and c:GetCode()==94878265
...@@ -50,18 +31,3 @@ function c67757079.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,18 +31,3 @@ function c67757079.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c67757079.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==67757079 and (fid==nil or c:GetFieldID()<fid)
end
function c67757079.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c67757079.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c67757079.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c67757079.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c67757079.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c67757079.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
...@@ -3,10 +3,13 @@ function c67987302.initial_effect(c) ...@@ -3,10 +3,13 @@ function c67987302.initial_effect(c)
--indes --indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(67987302) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x21)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x21))
e1:SetValue(c67987302.efilter) e1:SetValue(c67987302.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c67987302.efilter(e,re,rp,c)
return re:GetHandler()==c
end
--地縛神 Chacu Challhua --地縛神 Chacu Challhua
function c69931927.initial_effect(c) function c69931927.initial_effect(c)
--only 1 can exists c:SetUniqueOnField(1,1,10000000)
local e1=Effect.CreateEffect(c) --
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c69931927.excon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c69931927.splimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -56,23 +43,12 @@ function c69931927.initial_effect(c) ...@@ -56,23 +43,12 @@ function c69931927.initial_effect(c)
e8:SetCondition(c69931927.bpcon) e8:SetCondition(c69931927.bpcon)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function c69931927.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x21) and (fid==nil or c:GetFieldID()<fid)
end
function c69931927.excon(e)
return Duel.IsExistingMatchingCard(c69931927.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c69931927.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c69931927.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c69931927.sdcon(e) function c69931927.sdcon(e)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c69931927.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end end
function c69931927.damcost(e,tp,eg,ep,ev,re,r,rp,chk) function c69931927.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
......
--フィールドバリア --フィールドバリア
function c7153114.initial_effect(c) function c7153114.initial_effect(c)
c:SetUniqueOnField(1,0,7153114)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c7153114.condition)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indestructable --indestructable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -33,12 +33,6 @@ function c7153114.initial_effect(c) ...@@ -33,12 +33,6 @@ function c7153114.initial_effect(c)
e4:SetTarget(c7153114.sfilter) e4:SetTarget(c7153114.sfilter)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c7153114.afilter(c)
return c:IsFaceup() and c:GetCode()==7153114
end
function c7153114.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c7153114.afilter,tp,LOCATION_SZONE,0,1,nil)
end
function c7153114.infilter(e,c) function c7153114.infilter(e,c)
return c:IsType(TYPE_FIELD) return c:IsType(TYPE_FIELD)
end end
......
--ガーディアン·オブ·オーダー --ガーディアン·オブ·オーダー
function c71799173.initial_effect(c) function c71799173.initial_effect(c)
c:SetUniqueOnField(1,0,71799173)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -8,26 +9,6 @@ function c71799173.initial_effect(c) ...@@ -8,26 +9,6 @@ function c71799173.initial_effect(c)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c71799173.spcon) e1:SetCondition(c71799173.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--only 1 can exist
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetCondition(c71799173.excon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(c71799173.splimit)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SELF_DESTROY)
e5:SetCondition(c71799173.descon)
c:RegisterEffect(e5)
end end
function c71799173.spfilter(c) function c71799173.spfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
...@@ -36,19 +17,4 @@ function c71799173.spcon(e,c) ...@@ -36,19 +17,4 @@ function c71799173.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71799173.spfilter,c:GetControler(),LOCATION_MZONE,0,2,nil) and Duel.IsExistingMatchingCard(c71799173.spfilter,c:GetControler(),LOCATION_MZONE,0,2,nil)
and not Duel.IsExistingMatchingCard(c71799173.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c71799173.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==71799173 and (fid==nil or c:GetFieldID()<fid)
end
function c71799173.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c71799173.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c71799173.splimit(e,se,sp,st,spos,tgp)
return not Duel.IsExistingMatchingCard(c71799173.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c71799173.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c71799173.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end end
--ZW-一角獣皇槍 --ZW-一角獣皇槍
function c76080032.initial_effect(c) function c76080032.initial_effect(c)
c:SetUniqueOnField(1,0,76080032)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76080032,0)) e1:SetDescription(aux.Stringid(76080032,0))
...@@ -19,29 +20,9 @@ function c76080032.initial_effect(c) ...@@ -19,29 +20,9 @@ function c76080032.initial_effect(c)
e3:SetCondition(c76080032.discon) e3:SetCondition(c76080032.discon)
e3:SetOperation(c76080032.disop) e3:SetOperation(c76080032.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--only 1 can exists
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetCondition(c76080032.excon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(c76080032.splimit)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c76080032.descon)
c:RegisterEffect(e7)
end end
function c76080032.eqcon(e,tp,eg,ep,ev,re,r,rp) function c76080032.eqcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c76080032.exfilter,tp,LOCATION_ONFIELD,0,1,nil) return e:GetHandler():CheckUniqueOnField(tp)
end end
function c76080032.filter(c) function c76080032.filter(c)
return c:IsFaceup() and c:IsCode(56840427) return c:IsFaceup() and c:IsCode(56840427)
...@@ -57,7 +38,7 @@ function c76080032.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +38,7 @@ function c76080032.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
...@@ -96,19 +77,3 @@ end ...@@ -96,19 +77,3 @@ end
function c76080032.eqlimit(e,c) function c76080032.eqlimit(e,c)
return c:IsCode(56840427) return c:IsCode(56840427)
end end
function c76080032.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==76080032 and (fid==nil or c:GetFieldID()<fid)
end
function c76080032.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c76080032.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c76080032.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c76080032.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c76080032.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c76080032.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--原初のスープ --原初のスープ
function c78933589.initial_effect(c) function c78933589.initial_effect(c)
c:SetUniqueOnField(1,0,78933589)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c78933589.condition)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -17,12 +17,6 @@ function c78933589.initial_effect(c) ...@@ -17,12 +17,6 @@ function c78933589.initial_effect(c)
e2:SetOperation(c78933589.activate) e2:SetOperation(c78933589.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c78933589.afilter(c)
return c:IsFaceup() and c:GetCode()==78933589
end
function c78933589.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c78933589.afilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c78933589.filter(c) function c78933589.filter(c)
return c:IsSetCard(0x604e) and c:IsAbleToDeck() return c:IsSetCard(0x604e) and c:IsAbleToDeck()
end end
......
--地縛神 Ccarayhua --地縛神 Ccarayhua
function c79798060.initial_effect(c) function c79798060.initial_effect(c)
--only 1 can exists c:SetUniqueOnField(1,1,10000000)
local e1=Effect.CreateEffect(c) --
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c79798060.excon)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c79798060.splimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -46,23 +33,12 @@ function c79798060.initial_effect(c) ...@@ -46,23 +33,12 @@ function c79798060.initial_effect(c)
e7:SetOperation(c79798060.desop) e7:SetOperation(c79798060.desop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c79798060.exfilter(c,fid)
return c:IsFaceup() and c:IsSetCard(0x21) and (fid==nil or c:GetFieldID()<fid)
end
function c79798060.excon(e)
return Duel.IsExistingMatchingCard(c79798060.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c79798060.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c79798060.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c79798060.sdcon(e) function c79798060.sdcon(e)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup())) return ((f1==nil or not f1:IsFaceup()) and (f2==nil or not f2:IsFaceup()))
or Duel.IsExistingMatchingCard(c79798060.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end end
function c79798060.descon(e,tp,eg,ep,ev,re,r,rp) function c79798060.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--異次元エスパー・スター・ロビン --異次元エスパー・スター・ロビン
function c80208158.initial_effect(c) function c80208158.initial_effect(c)
c:SetUniqueOnField(1,1,80208158)
--target --target
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -25,26 +26,6 @@ function c80208158.initial_effect(c) ...@@ -25,26 +26,6 @@ function c80208158.initial_effect(c)
e3:SetTarget(c80208158.sptg) e3:SetTarget(c80208158.sptg)
e3:SetOperation(c80208158.spop) e3:SetOperation(c80208158.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--only 1 can exists
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetCondition(c80208158.excon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(c80208158.splimit)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c80208158.descon)
c:RegisterEffect(e7)
end end
function c80208158.tglimit(e,c) function c80208158.tglimit(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
...@@ -72,18 +53,3 @@ function c80208158.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,18 +53,3 @@ function c80208158.spop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1,true) c:RegisterEffect(e1,true)
end end
end end
function c80208158.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==80208158 and (fid==nil or c:GetFieldID()<fid)
end
function c80208158.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c80208158.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c80208158.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c80208158.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c80208158.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c80208158.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
--ZW-風神雲龍剣 --ZW-風神雲龍剣
function c81471108.initial_effect(c) function c81471108.initial_effect(c)
c:SetUniqueOnField(1,0,81471108)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81471108,0)) e1:SetDescription(aux.Stringid(81471108,0))
...@@ -24,29 +25,9 @@ function c81471108.initial_effect(c) ...@@ -24,29 +25,9 @@ function c81471108.initial_effect(c)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetValue(c81471108.repval) e3:SetValue(c81471108.repval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--only 1 can exists
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetCondition(c81471108.excon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(c81471108.splimit)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c81471108.descon)
c:RegisterEffect(e7)
end end
function c81471108.eqcon(e,tp,eg,ep,ev,re,r,rp) function c81471108.eqcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c81471108.exfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) return e:GetHandler():CheckUniqueOnField(tp)
end end
function c81471108.filter(c) function c81471108.filter(c)
return c:IsFaceup() and c:IsSetCard(0x7f) return c:IsFaceup() and c:IsSetCard(0x7f)
...@@ -62,7 +43,7 @@ function c81471108.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +43,7 @@ function c81471108.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
...@@ -90,19 +71,3 @@ end ...@@ -90,19 +71,3 @@ end
function c81471108.repval(e,re,r,rp) function c81471108.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c81471108.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==81471108 and (fid==nil or c:GetFieldID()<fid)
end
function c81471108.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c81471108.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c81471108.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c81471108.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c81471108.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c81471108.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--六武衆の師範 --六武衆の師範
function c83039729.initial_effect(c) function c83039729.initial_effect(c)
c:SetUniqueOnField(1,0,83039729)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -19,26 +20,6 @@ function c83039729.initial_effect(c) ...@@ -19,26 +20,6 @@ function c83039729.initial_effect(c)
e2:SetTarget(c83039729.thtg) e2:SetTarget(c83039729.thtg)
e2:SetOperation(c83039729.thop) e2:SetOperation(c83039729.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c83039729.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(c83039729.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c83039729.descon)
c:RegisterEffect(e6)
end end
function c83039729.spfilter(c) function c83039729.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) return c:IsFaceup() and c:IsSetCard(0x3d)
...@@ -47,7 +28,6 @@ function c83039729.spcon(e,c) ...@@ -47,7 +28,6 @@ function c83039729.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c83039729.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c83039729.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(c83039729.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end end
function c83039729.thcon(e,tp,eg,ep,ev,re,r,rp) function c83039729.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -70,18 +50,3 @@ function c83039729.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,18 +50,3 @@ function c83039729.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
function c83039729.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==83039729 and (fid==nil or c:GetFieldID()<fid)
end
function c83039729.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c83039729.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c83039729.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c83039729.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c83039729.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c83039729.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
...@@ -3,6 +3,7 @@ function c8310162.initial_effect(c) ...@@ -3,6 +3,7 @@ function c8310162.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,74509280),aux.NonTuner(Card.IsSetCard,0x23),1) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,74509280),aux.NonTuner(Card.IsSetCard,0x23),1)
c:EnableReviveLimit() c:EnableReviveLimit()
c:SetUniqueOnField(1,1,8310162)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8310162,0)) e1:SetDescription(aux.Stringid(8310162,0))
...@@ -14,48 +15,18 @@ function c8310162.initial_effect(c) ...@@ -14,48 +15,18 @@ function c8310162.initial_effect(c)
e1:SetTarget(c8310162.sptg) e1:SetTarget(c8310162.sptg)
e1:SetOperation(c8310162.spop) e1:SetOperation(c8310162.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--only 1 can exists --selfdes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON) e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c8310162.excon) e2:SetCondition(c8310162.descon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
e4:SetTarget(c8310162.sumlimit)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e5)
--selfdes
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c8310162.descon)
c:RegisterEffect(e6)
end
function c8310162.sumlimit(e,c)
return c:IsCode(8310162)
end
function c8310162.exfilter(c,fid)
return c:IsFaceup() and c:IsCode(8310162) and (fid==nil or c:GetFieldID()<fid)
end
function c8310162.excon(e)
return Duel.IsExistingMatchingCard(c8310162.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function c8310162.descon(e) function c8310162.descon(e)
local c=e:GetHandler() local c=e:GetHandler()
local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5) local f1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5) local f2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
return ((f1==nil or not f1:IsFaceup() or f1:GetCode()~=27564031) and (f2==nil or not f2:IsFaceup() or f2:GetCode()~=27564031)) return ((f1==nil or not f1:IsFaceup() or f1:GetCode()~=27564031) and (f2==nil or not f2:IsFaceup() or f2:GetCode()~=27564031))
or Duel.IsExistingMatchingCard(c8310162.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end end
function c8310162.spcon(e,tp,eg,ep,ev,re,r,rp) function c8310162.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
......
--Noble Arms - Arfeudutyr --Noble Arms - Arfeudutyr
function c83438826.initial_effect(c) function c83438826.initial_effect(c)
c:SetUniqueOnField(1,0,83438826)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c83438826.condition)
e1:SetTarget(c83438826.target) e1:SetTarget(c83438826.target)
e1:SetOperation(c83438826.operation) e1:SetOperation(c83438826.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -43,17 +43,10 @@ function c83438826.initial_effect(c) ...@@ -43,17 +43,10 @@ function c83438826.initial_effect(c)
end end
function c83438826.eqlimit(e,c) function c83438826.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR) return c:IsRace(RACE_WARRIOR)
and not Duel.IsExistingMatchingCard(c83438826.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c83438826.cfilter(c)
return c:IsFaceup() and c:IsCode(83438826)
end end
function c83438826.eqfilter1(c) function c83438826.eqfilter1(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end end
function c83438826.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c83438826.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c83438826.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83438826.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83438826.eqfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83438826.eqfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c83438826.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c83438826.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
...@@ -62,9 +55,10 @@ function c83438826.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,9 +55,10 @@ function c83438826.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c83438826.operation(e,tp,eg,ep,ev,re,r,rp) function c83438826.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,e:GetHandler(),tc) Duel.Equip(tp,c,tc)
end end
end end
function c83438826.desfilter(c) function c83438826.desfilter(c)
...@@ -103,7 +97,7 @@ function c83438826.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,7 +97,7 @@ function c83438826.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c83438826.eqcon(e,tp,eg,ep,ev,re,r,rp) function c83438826.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp)
end end
function c83438826.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) function c83438826.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,83438826)==0 end if chk==0 then return Duel.GetFlagEffect(tp,83438826)==0 end
......
--`ե --`ե
function c8487449.initial_effect(c) function c8487449.initial_effect(c)
c:SetUniqueOnField(1,0,8487449)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -17,31 +18,10 @@ function c8487449.initial_effect(c) ...@@ -17,31 +18,10 @@ function c8487449.initial_effect(c)
e2:SetCondition(c8487449.regcon) e2:SetCondition(c8487449.regcon)
e2:SetOperation(c8487449.regop) e2:SetOperation(c8487449.regop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c8487449.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(c8487449.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c8487449.descon)
c:RegisterEffect(e6)
end end
function c8487449.spcon(e,c) function c8487449.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c8487449.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end end
function c8487449.regcon(e,tp,eg,ep,ev,re,r,rp) function c8487449.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
...@@ -88,18 +68,3 @@ function c8487449.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,18 +68,3 @@ function c8487449.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
function c8487449.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==8487449 and (fid==nil or c:GetFieldID()<fid)
end
function c8487449.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c8487449.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c8487449.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c8487449.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c8487449.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c8487449.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--スーパーバグマン --スーパーバグマン
function c86804246.initial_effect(c) function c86804246.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
c:SetUniqueOnField(1,1,86804246)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -19,23 +20,6 @@ function c86804246.initial_effect(c) ...@@ -19,23 +20,6 @@ function c86804246.initial_effect(c)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c86804246.adfilter) e2:SetTarget(c86804246.adfilter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
e3:SetCondition(c86804246.excon)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(c86804246.splimit)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SELF_DESTROY)
e5:SetCondition(c86804246.descon)
c:RegisterEffect(e5)
end end
function c86804246.spfilter(c,code) function c86804246.spfilter(c,code)
return c:IsCode(code) and c:IsAbleToRemoveAsCost() return c:IsCode(code) and c:IsAbleToRemoveAsCost()
...@@ -44,7 +28,6 @@ function c86804246.spcon(e,c) ...@@ -44,7 +28,6 @@ function c86804246.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c86804246.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,87526784) and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,87526784)
and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,23915499) and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,23915499)
and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,50319138) and Duel.IsExistingMatchingCard(c86804246.spfilter,tp,LOCATION_GRAVE,0,1,nil,50319138)
...@@ -63,18 +46,3 @@ end ...@@ -63,18 +46,3 @@ end
function c86804246.adfilter(e,c) function c86804246.adfilter(e,c)
return c:IsPosition(POS_FACEUP_ATTACK) return c:IsPosition(POS_FACEUP_ATTACK)
end end
function c86804246.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==86804246 and (fid==nil or c:GetFieldID()<fid)
end
function c86804246.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c86804246.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c86804246.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c86804246.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c86804246.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c86804246.exfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
--ZW-不死鳥弩弓 --ZW-不死鳥弩弓
function c87008374.initial_effect(c) function c87008374.initial_effect(c)
c:SetUniqueOnField(1,0,87008374)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87008374,0)) e1:SetDescription(aux.Stringid(87008374,0))
...@@ -21,29 +22,9 @@ function c87008374.initial_effect(c) ...@@ -21,29 +22,9 @@ function c87008374.initial_effect(c)
e3:SetTarget(c87008374.damtg) e3:SetTarget(c87008374.damtg)
e3:SetOperation(c87008374.damop) e3:SetOperation(c87008374.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--only 1 can exists
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetCondition(c87008374.excon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(c87008374.splimit)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c87008374.descon)
c:RegisterEffect(e7)
end end
function c87008374.eqcon(e,tp,eg,ep,ev,re,r,rp) function c87008374.eqcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c87008374.exfilter,tp,LOCATION_ONFIELD,0,1,nil) return e:GetHandler():CheckUniqueOnField(tp)
end end
function c87008374.filter(c) function c87008374.filter(c)
return c:IsFaceup() and c:IsCode(56840427) return c:IsFaceup() and c:IsCode(56840427)
...@@ -59,7 +40,7 @@ function c87008374.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +40,7 @@ function c87008374.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
...@@ -96,19 +77,3 @@ end ...@@ -96,19 +77,3 @@ end
function c87008374.eqlimit(e,c) function c87008374.eqlimit(e,c)
return c:IsCode(56840427) return c:IsCode(56840427)
end end
function c87008374.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==87008374 and (fid==nil or c:GetFieldID()<fid)
end
function c87008374.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c87008374.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c87008374.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c87008374.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c87008374.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c87008374.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--渋い忍者 --渋い忍者
function c87483942.initial_effect(c) function c87483942.initial_effect(c)
c:SetUniqueOnField(1,1,87483942)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87483942,0)) e1:SetDescription(aux.Stringid(87483942,0))
...@@ -10,26 +11,6 @@ function c87483942.initial_effect(c) ...@@ -10,26 +11,6 @@ function c87483942.initial_effect(c)
e1:SetTarget(c87483942.sptg) e1:SetTarget(c87483942.sptg)
e1:SetOperation(c87483942.spop) e1:SetOperation(c87483942.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--only 1 exist
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetCondition(c87483942.excon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(c87483942.splimit)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SELF_DESTROY)
e5:SetCondition(c87483942.descon)
c:RegisterEffect(e5)
end end
function c87483942.filter(c,e,tp) function c87483942.filter(c,e,tp)
return c:IsSetCard(0x2b) and c:GetCode()~=87483942 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE) return c:IsSetCard(0x2b) and c:GetCode()~=87483942 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE)
...@@ -49,18 +30,3 @@ function c87483942.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,18 +30,3 @@ function c87483942.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)
end end
end end
function c87483942.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==87483942 and (fid==nil or c:GetFieldID()<fid)
end
function c87483942.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c87483942.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c87483942.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c87483942.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c87483942.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c87483942.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
--Ignoble Knight of Black Laundsallyn --Ignoble Knight of Black Laundsallyn
function c95772051.initial_effect(c) function c95772051.initial_effect(c)
c:SetUniqueOnField(1,0,95772051)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95772051,0)) e1:SetDescription(aux.Stringid(95772051,0))
...@@ -20,26 +21,6 @@ function c95772051.initial_effect(c) ...@@ -20,26 +21,6 @@ function c95772051.initial_effect(c)
e2:SetTarget(c95772051.thtg) e2:SetTarget(c95772051.thtg)
e2:SetOperation(c95772051.thop) e2:SetOperation(c95772051.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c95772051.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(c95772051.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c95772051.descon)
c:RegisterEffect(e6)
end end
function c95772051.spfilter(c) function c95772051.spfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) and c:IsAbleToGraveAsCost()
...@@ -82,18 +63,3 @@ function c95772051.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,18 +63,3 @@ function c95772051.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c95772051.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==95772051 and (fid==nil or c:GetFieldID()<fid)
end
function c95772051.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c95772051.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c95772051.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c95772051.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c95772051.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c95772051.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
--宮廷のしきたり --宮廷のしきたり
function c9995766.initial_effect(c) function c9995766.initial_effect(c)
c:SetUniqueOnField(1,0,9995766)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE) e1:SetHintTiming(0,TIMING_DRAW_PHASE)
e1:SetCondition(c9995766.condition)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indestructable --indestructable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -16,12 +16,6 @@ function c9995766.initial_effect(c) ...@@ -16,12 +16,6 @@ function c9995766.initial_effect(c)
e2:SetTarget(c9995766.infilter) e2:SetTarget(c9995766.infilter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9995766.afilter(c)
return c:IsFaceup() and c:GetCode()==9995766
end
function c9995766.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c9995766.afilter,tp,LOCATION_SZONE,0,1,nil)
end
function c9995766.infilter(e,c) function c9995766.infilter(e,c)
return bit.band(c:GetType(),0x20004)==0x20004 and c:GetCode()~=9995766 return bit.band(c:GetType(),0x20004)==0x20004 and c:GetCode()~=9995766
end end
...@@ -424,6 +424,7 @@ EFFECT_NECRO_VALLEY_IM =293 ...@@ -424,6 +424,7 @@ EFFECT_NECRO_VALLEY_IM =293
EFFECT_REVERSE_DECK =294 EFFECT_REVERSE_DECK =294
EFFECT_REMOVE_BRAINWASHING =295 EFFECT_REMOVE_BRAINWASHING =295
EFFECT_BP_TWICE =296 EFFECT_BP_TWICE =296
EFFECT_UNIQUE_CHECK =297
EFFECT_MATCH_KILL =300 EFFECT_MATCH_KILL =300
EVENT_STARTUP =1000 EVENT_STARTUP =1000
......
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