Commit 02cc350d authored by argon.sun's avatar argon.sun

fix&new scripts

parent 1c3659e9
......@@ -61,5 +61,6 @@ using namespace io;
using namespace gui;
extern const unsigned short PRO_VERSION;
extern bool enable_log;
#endif
......@@ -2,7 +2,9 @@
#include "game.h"
#include <event2/thread.h>
int main() {
bool enable_log = false;
int main(int argc, char* argv[]) {
#ifdef _WIN32
WORD wVersionRequested;
WSADATA wsaData;
......@@ -16,6 +18,8 @@ int main() {
ygo::mainGame = &_game;
if(!ygo::mainGame->Initialize())
return 0;
if(argc >= 2 && !strcmp(argv[1], "-debug"))
enable_log = true;
ygo::mainGame->MainLoop();
#ifdef _WIN32
WSACleanup();
......
......@@ -21,6 +21,7 @@ private:
static char net_server_read[0x2000];
static char net_server_write[0x2000];
static unsigned short last_sent;
public:
static bool StartServer(unsigned short port);
static bool StartBroadcast();
......
......@@ -1346,9 +1346,13 @@ void SingleDuel::RefreshSingle(int player, int location, int sequence, int flag)
}
}
int SingleDuel::MessageHandler(long fduel, int type) {
if(!enable_log)
return 0;
char msgbuf[1024];
get_log_message(fduel, (byte*)msgbuf);
FILE* fp = fopen("error.log", "at+");
if(!fp)
return 0;
msgbuf[1023] = 0;
fprintf(fp, "[Script error:] %s\n", msgbuf);
fclose(fp);
......
......@@ -1698,7 +1698,8 @@ int32 card::is_destructable_by_effect(effect* peffect, uint8 playerid) {
for(int32 i = 0; i < eset.count; ++i) {
pduel->lua->add_param(peffect, PARAM_TYPE_EFFECT);
pduel->lua->add_param(playerid, PARAM_TYPE_INT);
if(eset[i]->check_value_condition(2))
pduel->lua->add_param(this, PARAM_TYPE_CARD);
if(eset[i]->check_value_condition(3))
return FALSE;
}
return TRUE;
......
......@@ -352,7 +352,7 @@ static const struct luaL_Reg duellib[] = {
{ "IsDamageCalculated", scriptlib::duel_is_damage_calculated },
{ "GetAttacker", scriptlib::duel_get_attacker },
{ "GetAttackTarget", scriptlib::duel_get_attack_target },
{ "DisableAttack", scriptlib::duel_disable_attack },
{ "NegateAttack", scriptlib::duel_disable_attack },
{ "ChainAttack", scriptlib::duel_chain_attack },
{ "Readjust", scriptlib::duel_readjust },
{ "GetFieldGroup", scriptlib::duel_get_field_group },
......
......@@ -184,7 +184,8 @@ void field::destroy(card_set* targets, effect* reason_effect, uint32 reason, uin
(*cit)->temp.reason_effect = (*cit)->current.reason_effect;
(*cit)->temp.reason_player = (*cit)->current.reason_player;
(*cit)->current.reason = reason;
(*cit)->current.reason_effect = reason_effect;
if(reason_effect)
(*cit)->current.reason_effect = reason_effect;
(*cit)->current.reason_player = reason_player;
p = playerid;
if(!(destination & (LOCATION_HAND + LOCATION_DECK + LOCATION_REMOVED)))
......@@ -732,10 +733,14 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_player, card * pcard, uint8 playerid, uint8 reset_phase, uint8 reset_count) {
switch(step) {
case 0: {
if(pcard->current.controler == playerid) {
returns.ivalue[0] = 1;
return TRUE;
}
returns.ivalue[0] = 0;
if(pcard->overlay_target)
return TRUE;
if(pcard->current.controler == PLAYER_NONE || pcard->current.controler == playerid)
if(pcard->current.controler == PLAYER_NONE)
return TRUE;
if(pcard->current.location != LOCATION_MZONE)
return TRUE;
......
......@@ -4298,18 +4298,22 @@ int32 field::adjust_step(uint16 step) {
}
//self destroy
uint8 tp = infos.turn_player;
card* pcard;
effect* peffect;
core.destroy_set.clear();
for(uint8 p = 0; p < 2; ++p) {
for(uint8 i = 0; i < 5; ++i) {
pcard = player[tp].list_mzone[i];
if(pcard && pcard->is_position(POS_FACEUP) && pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))
card* pcard = player[tp].list_mzone[i];
if(pcard && pcard->is_position(POS_FACEUP) && (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))) {
core.destroy_set.insert(pcard);
pcard->current.reason_effect = peffect;
}
}
for(uint8 i = 0; i < 6; ++i) {
pcard = player[tp].list_szone[i];
if(pcard && pcard->is_position(POS_FACEUP) && pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))
card* pcard = player[tp].list_szone[i];
if(pcard && pcard->is_position(POS_FACEUP) && (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))) {
core.destroy_set.insert(pcard);
pcard->current.reason_effect = peffect;
}
}
tp = 1 - tp;
}
......
......@@ -101,7 +101,7 @@ function c10000010.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000)
end
function c10000010.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocatioin(LOCATION_MZONE) and chkcLIsDestructable() end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -101,7 +101,7 @@ function c10000011.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000)
end
function c10000011.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocatioin(LOCATION_MZONE) and chkcLIsDestructable() end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
--地縛神 Aslla piscu
function c10875327.initial_effect(c)
--only 1 can exists
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)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c10875327.sdcon)
c:RegisterEffect(e4)
--battle target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
--direct atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--destroy
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(10875327,0))
e7:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_LEAVE_FIELD)
e7:SetCondition(c10875327.descon)
e7:SetTarget(c10875327.destg)
e7:SetOperation(c10875327.desop)
c:RegisterEffect(e7)
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)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end
local f1=Duel.GetFieldCard(0,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()))
or Duel.IsExistingMatchingCard(c10875327.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end
function c10875327.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
and (not re or re:GetHandler()~=c)
end
function c10875327.desfilter(c)
return c:IsFaceup() and c:IsDestructable()
end
function c10875327.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c10875327.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
if g:GetCount()~=0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*800)
end
end
function c10875327.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c10875327.desfilter,tp,0,LOCATION_MZONE,nil)
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct~=0 then
Duel.Damage(1-tp,ct*800,REASON_EFFECT)
end
end
......@@ -21,7 +21,7 @@ function c14315573.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c14315573.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToEffect(tc) and tc:IsFaceup() and Duel.DisableAttack(tc) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
end
......@@ -30,7 +30,7 @@ function c14462257.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c14462257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsCOntroler(tp) and c14462257.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14462257.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14462257.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c14462257.filter,tp,LOCATION_GRAVE,0,1,1,nil)
......
--地縛神 Uru
function c15187079.initial_effect(c)
--only 1 can exists
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)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c15187079.sdcon)
c:RegisterEffect(e4)
--battle target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
--direct atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--damage
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(15187079,0))
e7:SetCategory(CATEGORY_CONTROL)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCost(c15187079.ctcost)
e7:SetTarget(c15187079.cttg)
e7:SetOperation(c15187079.ctop)
c:RegisterEffect(e7)
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)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end
local f1=Duel.GetFieldCard(0,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()))
or Duel.IsExistingMatchingCard(c15187079.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end
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
local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler())
Duel.Release(g,REASON_EFFECT)
end
function c15187079.filter(c)
return c:IsFaceup() and c:IsAbleToChangeControler()
end
function c15187079.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c15187079.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c15187079.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c15187079.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c15187079.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
......@@ -19,7 +19,7 @@ function c16255442.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0,nil)
local tg=Duel.GetMatchingGroup(c16255442.filter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_HANDDES,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_HANDES,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,sg:GetCount(),tp,LOCATION_GRAVE)
end
function c16255442.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -18,7 +18,7 @@ function c18060565.filter(c)
return c:IsFaceup() and c:IsSetCard(0x29) and c:IsRace(RACE_WINDBEAST)
end
function c18060565.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MOZNE) and chkc:IsControler(tp) and c18060565.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c18060565.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c18060565.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
......@@ -21,7 +21,7 @@ end
function c18407024.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSGDISCARD)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local sg=g:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
......@@ -20,6 +20,7 @@ function c18964575.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c18964575.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
if Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
end
......@@ -6,7 +6,7 @@ function c20638610.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_ENG_PHASE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c20638610.target)
e1:SetOperation(c20638610.operation)
c:RegisterEffect(e1)
......
......@@ -49,7 +49,7 @@ function c21420702.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,HAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function c21420702.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
......@@ -41,7 +41,7 @@ end
function c22201234.aop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if e:GetLabel()==1 then
Duel.DisableAttack()
Duel.NegateAttack()
end
end
function c22201234.qcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -60,5 +60,5 @@ function c22201234.qtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c22201234.qop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.DisableAttack()
Duel.NegateAttack()
end
......@@ -8,7 +8,7 @@ function c22751868.initial_effect(c)
--pos
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22751868,0))
e2:SetCategory(CATEGIORY_POSITION)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
......
......@@ -54,5 +54,5 @@ function c22858242.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(tg)
end
function c22858242.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
......@@ -27,7 +27,7 @@ function c23093604.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_LPDAMAGE,0,0,tp,1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end
function c23093604.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
......
......@@ -16,7 +16,7 @@ function c24150026.initial_effect(c)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24150026,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c24150026.poscon)
......
......@@ -3,7 +3,7 @@ function c24291651.initial_effect(c)
--to defence
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24291651,0))
e1:SetCategory(CATEGIORY_POSITION)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetCondition(c24291651.poscon)
......
......@@ -97,7 +97,7 @@ function c24696097.daop(e,tp,eg,ep,ev,re,r,rp,chk)
if c:IsRelateToEffect(e) then
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
Duel.DisableAttack()
Duel.NegateAttack()
c:RegisterFlagEffect(24696097,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,0,0)
end
function c24696097.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,12 +30,10 @@ end
function c25642998.activate(e,tp,eg,ep,ev,re,r,rp)
local tg,d=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS,CHAININFO_TARGET_PARAM)
local tc=tg:GetFirst()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then
if Duel.DisableAttack(tc) then
local dam=Duel.GetMatchingGroupCount(c25642998.dfilter,tp,LOCATION_MZONE,0,nil)*800
if dam>0 then
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() and Duel.NegateAttack() then
local dam=Duel.GetMatchingGroupCount(c25642998.dfilter,tp,LOCATION_MZONE,0,nil)*800
if dam>0 then
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
end
......@@ -20,6 +20,7 @@ function c25866285.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c25866285.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
if Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
end
......@@ -63,7 +63,7 @@ function c26302522.desop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject()
if ec:IsRelateToEffect(e) and ec:IsFaceup() then
local atk=ec:GetAttack()
if Duel.Destroy(ec,REASON_EFFET)~=0 then
if Duel.Destroy(ec,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
else Duel.Destroy(c,REASON_EFFECT) end
end
......
--地縛波
function c29934351.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c29934351.condition)
e1:SetTarget(c29934351.target)
e1:SetOperation(c29934351.activate)
c:RegisterEffect(e1)
end
function c29934351.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x21)
end
function c29934351.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainInactivatable(ev)
and Duel.IsExistingMatchingCard(c29934351.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c29934351.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c29934351.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
......@@ -16,7 +16,7 @@ function c30230789.initial_effect(c)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(30230789,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c30230789.poscon)
......
......@@ -5,7 +5,7 @@ function c31550470.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_PHASE_END)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c31550470.target)
e1:SetOperation(c31550470.operation)
......
--地縛神 Cusillu
function c33537328.initial_effect(c)
--only 1 can exists
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)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c33537328.sdcon)
c:RegisterEffect(e4)
--battle target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
--direct atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--destroy replace
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_DESTROY_REPLACE)
e7:SetTarget(c33537328.desreptg)
c:RegisterEffect(e7)
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)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end
local f1=Duel.GetFieldCard(0,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()))
or Duel.IsExistingMatchingCard(c33537328.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end
function c33537328.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE) and c:GetBattlePosition()~=POS_FACEUP_DEFENCE
and Duel.CheckReleaseGroup(tp,nil,1,c) end
if Duel.SelectYesNo(tp,aux.Stringid(33537328,0)) then
local g=Duel.SelectReleaseGroup(tp,nil,1,1,c)
Duel.Release(g,REASON_EFFECT)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2)
return true
else return false end
end
......@@ -11,7 +11,7 @@ function c33782437.initial_effect(c)
end
function c33782437.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CHAININFO_DRAW,nil,0,PLAYER_ALL,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c33782437.activate(e,tp,eg,ep,ev,re,r,rp)
local d1=Duel.Draw(tp,1,REASON_EFFECT)
......
......@@ -76,7 +76,7 @@ function c3606728.atkfilter(c)
return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c3606728.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(MZONE) and chkc:IsControler(1-tp) and c3606728.atkfilter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c3606728.atkfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c3606728.atkfilter,tp,0,LOCATION_MZONE,1,1,nil)
......
......@@ -49,7 +49,7 @@ function c36623431.condition2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c36623431.costfilter(c)
return c:IsSetCard(0x1d) and c:IsAbleToGraveAsCost()
return c:IsSetCard(0x1d) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c36623431.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36623431.costfilter,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -21,6 +21,8 @@ function c3825890.initial_effect(c)
--Destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetTarget(c3825890.desreptg)
c:RegisterEffect(e3)
......@@ -45,7 +47,7 @@ function c3825890.atkval(e,c)
end
function c3825890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsFaceup()
if chk==0 then return not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(c3825890.filter,tp,LOCATION_HAND,0,1,nil) end
if Duel.SelectYesNo(tp,aux.Stringid(3825890,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
......
......@@ -16,7 +16,7 @@ function c3846170.initial_effect(c)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(3846170,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c3846170.poscon)
......
......@@ -16,7 +16,7 @@ function c39118197.initial_effect(c)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(39118197,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c39118197.poscon)
......
--早すぎた復活
function c39967326.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c39967326.target)
e1:SetOperation(c39967326.activate)
c:RegisterEffect(e1)
end
function c39967326.filter(c,e,tp)
return c:IsSetCard(0x21) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c39967326.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39967326.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c39967326.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c39967326.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c39967326.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
end
--地縛神 Wiraqocha Rasca
function c41181774.initial_effect(c)
--only 1 can exists
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)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c41181774.sdcon)
c:RegisterEffect(e4)
--battle target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
--direct atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--handes
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(41181774,0))
e7:SetCategory(CATEGORY_TODECK+CATEGORY_HANDES)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetCode(EVENT_SUMMON_SUCCESS)
e7:SetTarget(c41181774.hdtg)
e7:SetOperation(c41181774.hdop)
c:RegisterEffect(e7)
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)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end
local f1=Duel.GetFieldCard(0,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()))
or Duel.IsExistingMatchingCard(c41181774.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end
function c41181774.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsAbleToDeck() end
if chk==0 then return true end
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,ct,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c41181774.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not g then return end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==0 then return end
local dg=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,ct)
local dt=Duel.SendtoGrave(dg,REASON_EFFECT_REASON_DISCARD)
local c=e:GetHandler()
if dt~=0 and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(dt*1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
......@@ -21,5 +21,5 @@ function c42110434.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c42110434.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,1,REASON_EFFECT)
Duel.DisableAttack()
Duel.NegateAttack()
end
......@@ -24,7 +24,7 @@ function c42328171.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c42328171.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c42328171.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c42328171.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -49,11 +49,11 @@ function c43378048.spcon(e,c)
and Duel.IsExistingMatchingCard(c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,nil,69890967)
end
function c43378048.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,6007213)
Duel.Hint(HINT_SELECTMSG,tp,REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,32491822)
Duel.Hint(HINT_SELECTMSG,tp,REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=Duel.SelectMatchingCard(tp,c43378048.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,69890967)
g1:Merge(g2)
g1:Merge(g3)
......
......@@ -7,7 +7,7 @@ function c43925870.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RAMGE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c43925870.val)
c:RegisterEffect(e1)
......
......@@ -29,6 +29,6 @@ function c44883600.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c44883600.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.DisableAttack()
Duel.NegateAttack()
end
end
......@@ -3,7 +3,7 @@ function c45033006.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45033006,0))
e1:SetCategory(CATEGORY_CONTROLER)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
......
--地縛神 Ccapac Apu
function c46263076.initial_effect(c)
--only 1 can exists
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)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c46263076.sdcon)
c:RegisterEffect(e4)
--battle target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
--direct atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--damage
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(46263076,0))
e7:SetCategory(CATEGORY_DAMAGE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_BATTLE_DESTROYING)
e7:SetTarget(c46263076.damtg)
e7:SetOperation(c46263076.damop)
c:RegisterEffect(e7)
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)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end
local f1=Duel.GetFieldCard(0,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()))
or Duel.IsExistingMatchingCard(c46263076.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end
function c46263076.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetHandler():GetBattleTarget()
local atk=tc:GetBaseAttack()
if atk<0 then atk=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c46263076.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
......@@ -22,7 +22,7 @@ function c4906301.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c4906301.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttacker() then Duel.DisableAttack()
if Duel.GetAttacker() then Duel.NegateAttack()
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -34,5 +34,5 @@ function c4906301.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c4906301.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
......@@ -22,7 +22,7 @@ function c49833312.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c49833312.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.DisableAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.NegateAttack() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49833312.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -11,7 +11,7 @@ end
function c49905576.drop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsType(TYPE_COUNTER) then return end
Duel.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFET)
Duel.Recover(tp,1000,REASON_EFFECT)
if Duel.GetEnvironment()~=56433456 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
......
......@@ -30,5 +30,5 @@ function c50604950.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST)
end
function c50604950.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
......@@ -16,7 +16,7 @@ function c50615578.initial_effect(c)
--pos change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(50615578,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetOperation(c50615578.posop)
......
......@@ -25,7 +25,7 @@ function c55624610.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c55624610.desfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TPGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c55624610.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
--地縛神の咆哮
function c56339050.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c56339050.target)
e1:SetOperation(c56339050.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(56339050,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(c56339050.condition2)
e2:SetTarget(c56339050.target2)
e2:SetOperation(c56339050.operation)
c:RegisterEffect(e2)
end
function c56339050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc==Duel.GetAttacker() end
if chk==0 then return true end
if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp then
local tc=Duel.GetAttacker()
if Duel.IsExistingMatchingCard(c56339050.cfilter,tp,LOCATION_MZONE,0,1,nil,tc:GetAttack())
and tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.SetTargetCard(tc)
local dam=tc:GetAttack()
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
e:GetHandler():RegisterFlagEffect(56339050,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
else
e:SetCategory(0)
e:SetProperty(0)
end
end
end
function c56339050.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then
local atk=tc:GetAttack()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
end
function c56339050.cfilter(c,atk)
return c:IsFaceup() and c:IsSetCard(0x21) and c:GetAttack()>atk
end
function c56339050.condition2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
return Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(c56339050.cfilter,tp,LOCATION_MZONE,0,1,nil,tc:GetAttack())
end
function c56339050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetAttacker()
if chkc then return chkc==tc end
if chk==0 then return e:GetHandler():GetFlagEffect(56339050)==0
and tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end
Duel.SetTargetCard(tc)
local dam=tc:GetAttack()
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
e:GetHandler():RegisterFlagEffect(56339050,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
......@@ -23,7 +23,7 @@ function c57115864.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c57115864.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
......@@ -13,7 +13,7 @@ function c57568840.initial_effect(c)
c:RegisterEffect(e1)
end
function c57568840.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
......
......@@ -3,7 +3,7 @@ function c58324930.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58324930,0))
e1:SetCategory(CATEGORY_REMVOE)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
......
......@@ -14,5 +14,5 @@ function c59575539.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,800)
end
function c59575539.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
......@@ -21,7 +21,7 @@ function c6007213.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINBGLE_RANGE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c6007213.atkval)
c:RegisterEffect(e3)
......
......@@ -5,7 +5,7 @@ function c61068510.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_PHASE_END)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c61068510.condition)
e1:SetTarget(c61068510.target)
......
......@@ -27,7 +27,7 @@ function c62279055.activate(e,tp,eg,ep,ev,re,r,rp)
local tg,d=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS,CHAININFO_TARGET_PARAM)
local tc=tg:GetFirst()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then
if Duel.DisableAttack(tc) then
if Duel.NegateAttack(tc) then
Duel.Damage(1-tp,d,REASON_EFFECT)
end
end
......
......@@ -16,7 +16,7 @@ function c6276588.initial_effect(c)
--pos change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(6276588,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetOperation(c6276588.posop)
......
......@@ -88,7 +88,7 @@ function c63014935.phcon(e,tp,eg,ep,ev,re,r,rp)
end
function c63014935.phtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(63014935)==0 end
e:GetHandler():RegisterFlagEffect(63014935,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_PATH,1)
e:GetHandler():RegisterFlagEffect(63014935,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c63014935.phop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckReleaseGroup(tp,aux.TRUE,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(63014935,2)) then
......
--地縛神の復活
function c64187086.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c64187086.cost)
e1:SetTarget(c64187086.target)
e1:SetOperation(c64187086.activate)
c:RegisterEffect(e1)
end
function c64187086.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c64187086.filter1(c)
return c:IsSetCard(0x21) and c:IsAbleToHand()
end
function c64187086.filter2(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c64187086.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c64187086.filter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(c64187086.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectTarget(tp,c64187086.filter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectTarget(tp,c64187086.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
end
function c64187086.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
......@@ -25,7 +25,7 @@ function c65150219.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c65150219.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.DisableAttack() then
if Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
end
......
......@@ -16,7 +16,7 @@ function c66457407.lvfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function c66457407.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(MZONE) and c66457407.lvfilter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c66457407.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c66457407.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c66457407.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -16,7 +16,7 @@ function c66625883.initial_effect(c)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(66625883,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c66625883.poscon)
......
......@@ -118,7 +118,7 @@ function c67030233.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner)
g:AddCard(m2)
local lv2=m2:GetLevel()
mg:RemoveCard(m2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_MATERIAL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local t3=mg:FilterSelect(tp,c67030233.synfilter3,1,1,nil,lv-lv1-lv2)
g:Merge(t3)
end
......
--地縛大神官
function c67987302.initial_effect(c)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(67987302)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x21))
e1:SetValue(c67987302.efilter)
c:RegisterEffect(e1)
end
--地縛神 Chacu Challhua
function c69931927.initial_effect(c)
--only 1 can exists
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)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c69931927.sdcon)
c:RegisterEffect(e4)
--battle target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
--direct atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--damage
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(69931927,0))
e7:SetCategory(CATEGORY_DAMAGE)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCost(c69931927.damcost)
e7:SetTarget(c69931927.damtg)
e7:SetOperation(c69931927.damop)
c:RegisterEffect(e7)
--bp
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetCode(EFFECT_CANNOT_BP)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(0,1)
e8:SetCondition(c69931927.bpcon)
c:RegisterEffect(e8)
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)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end
local f1=Duel.GetFieldCard(0,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()))
or Duel.IsExistingMatchingCard(c69931927.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end
function c69931927.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c69931927.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dam=e:GetHandler():GetDefence()/2
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c69931927.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c69931927.bpcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE)
end
......@@ -16,7 +16,7 @@ function c70271583.initial_effect(c)
--pos change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(70271583,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetOperation(c70271583.posop)
......
......@@ -21,7 +21,7 @@ end
function c7405310.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c7405310.filter,1-tp,LOCATION_EXTRA,0,nil,e:GetLabel())
if g:GetCount()~=0 then
Duel.Hint(HINT_SELECTMSG,1-tp,REMOVE)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local rg=g:FilterSelect(1-tp,Card.IsAbleToRemove,1,1,nil)
if rg:GetCount()~=0 then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
......
......@@ -31,7 +31,7 @@ function c75326861.filter(c)
return c:GetEquipCount()>0
end
function c75326861.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c75326861.filter(cHKC) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c75326861.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c75326861.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,c75326861.filter,tp,0,LOCATION_MZONE,1,1,nil)
......
......@@ -3,7 +3,7 @@ function c75673220.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75673220,0))
e1:SetCategory(CATEGORY_SPECIAL_REMOVE)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c75673220.condition)
......
......@@ -37,7 +37,7 @@ end
function c7617253.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetAttacker()
if not tg:IsRelateToEffect(e) or tg:IsStatus(STATUS_ATTACK_CANCELED)
or not Duel.DisableAttack() then return end
or not Duel.NegateAttack() then return end
local g=Duel.GetMatchingGroup(c7617253.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(7617253,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -42,6 +42,7 @@ function c78349103.initial_effect(c)
e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c78349103.scon)
e5:SetTarget(c78349103.stg)
e5:SetOperation(c78349103.sop)
c:RegisterEffect(e5)
......@@ -91,6 +92,9 @@ end
function c78349103.sfilter(c)
return c:IsType(TYPE_UNION) and c:IsAbleToHand()
end
function c78349103.scon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c78349103.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c78349103.sfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
......@@ -34,7 +34,7 @@ function c78422252.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(tg)
end
function c78422252.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
function c78422252.spcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
......
--地縛神 Ccarayhua
function c79798060.initial_effect(c)
--only 1 can exists
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)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c79798060.sdcon)
c:RegisterEffect(e4)
--battle target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
--direct atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
--destroy
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(79798060,0))
e7:SetCategory(CATEGORY_DESTROY)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_DESTROY)
e7:SetCondition(c79798060.descon)
e7:SetTarget(c79798060.destg)
e7:SetOperation(c79798060.desop)
c:RegisterEffect(e7)
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)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or c:IsHasEffect(67987302) then return false end
local f1=Duel.GetFieldCard(0,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()))
or Duel.IsExistingMatchingCard(c79798060.exfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetFieldID())
end
function c79798060.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (not c:IsOnField() or c:IsFaceup()) and (not re or re:GetHandler()~=c)
end
function c79798060.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c79798060.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -17,5 +17,5 @@ function c80538728.condition(e,tp,eg,ep,ev,re,r,rp)
return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(0x58)
end
function c80538728.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
--栄誉の贄
function c82340056.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c82340056.condition)
e1:SetTarget(c82340056.target)
e1:SetOperation(c82340056.activate)
c:RegisterEffect(e1)
end
function c82340056.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000 and Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil
end
function c82340056.filter(c)
return c:IsSetCard(0x21) and c:IsAbleToHand()
end
function c82340056.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,82340057,0,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH)
and Duel.IsExistingMatchingCard(c82340056.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c82340056.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2
or not Duel.IsPlayerCanSpecialSummonMonster(tp,82340057,0,0x4011,0,0,1,RACE_ROCK,ATTRIBUTE_EARTH) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c82340056.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()==0 then return end
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
for i=1,2 do
local token=Duel.CreateToken(tp,82340057)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASEABLE_NONSUM)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(1)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNRELEASEABLE_SUM)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(c82340056.sumlimit)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(1)
token:RegisterEffect(e3,true)
end
Duel.SpecialSummonComplete()
end
function c82340056.sumlimit(e,c)
return not c:IsSetCard(0x21)
end
......@@ -28,7 +28,7 @@ function c84013237.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c84013237.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
function c84013237.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -66,7 +66,7 @@ end
function c89493368.naop(e,tp,eg,ep,ev,re,r,rp)
tc=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.DisableAttack(tc)
Duel.NegateAttack(tc)
end
end
function c89493368.spcfilter(c,code)
......
......@@ -25,7 +25,7 @@ function c91822647.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c91822647.filter1,tp,LOCATION_GRAVE,0,2,nil)
and Duel.IsExistingMatchingCard(c91822647.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c91822647.filter1,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
......
......@@ -16,7 +16,7 @@ function c92300891.initial_effect(c)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(92300891,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c92300891.poscon)
......
......@@ -27,5 +27,5 @@ function c92720564.cond(e,tp,eg,ep,ev,re,r,rp)
return not c:IsDisabled() and c:IsDefence() and d:IsFaceup() and d:IsSetCard(0x26)
end
function c92720564.opd(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
......@@ -29,7 +29,7 @@ function c92890308.activate(e,tp,eg,ep,ev,re,r,rp)
local ta=Duel.GetAttacker()
local td=Duel.GetAttackTarget()
if ta:IsRelateToEffect(e) and ta:IsFaceup() and ta:IsAttackable()
and Duel.DisableAttack() and td:IsFaceup() and td:IsRelateToEffect(e) then
and Duel.NegateAttack() and td:IsFaceup() and td:IsRelateToEffect(e) then
Duel.ChangePosition(td,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0)
end
end
......@@ -16,7 +16,7 @@ function c93724592.initial_effect(c)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(93724592,0))
e3:SetCategory(CATEGIORY_POSITION)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c93724592.poscon)
......
......@@ -32,7 +32,7 @@ end
function c93830681.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.DisableAttack()
Duel.NegateAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -17,5 +17,5 @@ function c94845226.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,c94845226.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c94845226.op(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
......@@ -25,5 +25,5 @@ function c95472621.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c95472621.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
Duel.Remove(g,POS_FACEUP,EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
......@@ -31,5 +31,5 @@ function c96427353.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(tg)
end
function c96427353.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
end
--地縛旋風
function c96907086.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c96907086.condition)
e1:SetTarget(c96907086.target)
e1:SetOperation(c96907086.activate)
c:RegisterEffect(e1)
end
function c96907086.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x21)
end
function c96907086.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c96907086.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c96907086.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c96907086.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96907086.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c96907086.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c96907086.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c96907086.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -142,7 +142,7 @@ function c97489701.natg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c97489701.naop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DisableAttack()
Duel.NegateAttack()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then
c:RegisterFlagEffect(97489701,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
......
......@@ -20,7 +20,7 @@ function c98427577.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(tg)
end
function c98427577.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableAttack()
Duel.NegateAttack()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
......
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