Commit f2051722 authored by argon's avatar argon

fix

parent b47962f2
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <dirent.h> #include <dirent.h>
#endif #endif
const unsigned short PRO_VERSION = 0x1300; const unsigned short PRO_VERSION = 0x1310;
namespace ygo { namespace ygo {
......
...@@ -8,6 +8,7 @@ namespace ygo { ...@@ -8,6 +8,7 @@ namespace ygo {
#define REPLAY_COMPRESSED 0x1 #define REPLAY_COMPRESSED 0x1
#define REPLAY_TAG 0x2 #define REPLAY_TAG 0x2
#define REPLAY_DECODED 0x4
struct ReplayHeader { struct ReplayHeader {
unsigned int id; unsigned int id;
......
...@@ -1407,6 +1407,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc, ...@@ -1407,6 +1407,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
} }
if(proc) if(proc)
remove_oath_effect(proc); remove_oath_effect(proc);
if(target->current.location == LOCATION_MZONE)
send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0);
adjust_instant(); adjust_instant();
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0);
return TRUE; return TRUE;
...@@ -1511,9 +1513,10 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) { ...@@ -1511,9 +1513,10 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
return FALSE; return FALSE;
} }
case 2: { case 2: {
if(target->is_status(STATUS_SUMMONING)) { if(target->is_status(STATUS_SUMMONING))
return FALSE; return FALSE;
} if(target->current.location == LOCATION_MZONE)
send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0);
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0);
return TRUE; return TRUE;
} }
...@@ -2013,6 +2016,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) { ...@@ -2013,6 +2016,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
return FALSE; return FALSE;
} }
remove_oath_effect(core.units.begin()->peffect); remove_oath_effect(core.units.begin()->peffect);
if(target->current.location == LOCATION_MZONE)
send_to(target, 0, REASON_RULE, sumplayer, sumplayer, LOCATION_GRAVE, 0, 0);
adjust_instant(); adjust_instant();
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0); add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, 0);
return TRUE; return TRUE;
......
...@@ -16,7 +16,7 @@ function c15240238.initial_effect(c) ...@@ -16,7 +16,7 @@ function c15240238.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c15240238.filter(c) function c15240238.filter(c)
return c:IsFaceup() and c:GetAttack()>0 return c:IsFaceup()
end end
function c15240238.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15240238.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 c15240238.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c15240238.filter(chkc) end
......
...@@ -63,7 +63,7 @@ function c6330307.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function c6330307.atkcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c6330307.atkop(e,tp,eg,ep,ev,re,r,rp) function c6330307.atkop(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
if at:IsRelateToBattle() then if at:IsRelateToBattle() and not at:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
...@@ -82,7 +82,7 @@ function c94973028.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,7 +82,7 @@ function c94973028.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c94973028.desfilter(c) function c94973028.desfilter(c)
return c:IsDestructable() and c:IsAbleToRemove() return c:IsDestructable()
end end
function c94973028.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94973028.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c94973028.desfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c94973028.desfilter(chkc) end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment