Commit 5f6e2c33 authored by argon.sun's avatar argon.sun

fix

parent ecc4bc9c
......@@ -58,7 +58,7 @@ CGUIImageButton::CGUIImageButton(IGUIEnvironment* environment, IGUIElement* pare
imageScale = core::vector2df(1.0f, 1.0f);
}
CGUIImageButton* CGUIImageButton::addImageButton(IGUIEnvironment *env, const core::rect<s32>& rectangle, IGUIElement* parent, s32 id) {
CGUIImageButton* button = new CGUIImageButton(env, parent ? parent : dynamic_cast<IGUIElement*>(env), id, rectangle);
CGUIImageButton* button = new CGUIImageButton(env, parent ? parent : 0, id, rectangle);
button->drop();
return button;
}
......
......@@ -3,7 +3,7 @@
namespace ygo {
const unsigned short PROTO_VERSION = 0x1017;
const unsigned short PROTO_VERSION = 0x1020;
bool NetManager::CreateHost(int ipindex) {
wchar_t* pstr;
......
......@@ -73,5 +73,6 @@ public:
#define DUEL_TEST_MODE 0x01
#define DUEL_ATTACK_FIRST_TURN 0x02
#define DUEL_NO_CHAIN_HINT 0x04
#define DUEL_ENABLE_PRIORITY 0x08
#endif /* DUEL_H_ */
......@@ -1664,14 +1664,15 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
return FALSE;
}
case 7: {
/* Due to the new official rules, the priority of ignition effects when summon, special summon, flip summon is canceled
//ignition & quick effect
if(!(core.duel_options & DUEL_ENABLE_PRIORITY))
return FALSE;
// Due to the new official rules, the priority of ignition effects when summon, special summon, flip summon is canceled
// Use DUEL_ENABLE_PRIORITY to enable this feature (TCG)
// ignition effects
tevent e;
if(core.current_chain.size() == 0 &&
(check_event(EVENT_SUMMON_SUCCESS, &e) || check_event(EVENT_SPSUMMON_SUCCESS, &e) || check_event(EVENT_FLIP_SUMMON_SUCCESS, &e))
&& e.reason_player == infos.turn_player) {
effect* peffect;
effect_container::iterator eit;
chain newchain;
tevent e;
e.event_cards = 0;
......@@ -1680,12 +1681,13 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
e.reason_effect = 0;
e.reason = 0;
e.reason_player = PLAYER_NONE;
for(eit = effects.startup_effect.begin(); eit != effects.startup_effect.end(); ++eit) {
peffect = eit->second;
for(auto eit = effects.ignition_effect.begin(); eit != effects.ignition_effect.end(); ++eit) {
effect* peffect = eit->second;
e.event_code = peffect->code;
if(peffect->handler->current.location == LOCATION_MZONE && peffect->is_chainable() && peffect->is_activateable(infos.turn_player, e)) {
if(peffect->handler->current.location == LOCATION_MZONE && peffect->is_chainable(infos.turn_player)
&& peffect->is_activateable(infos.turn_player, e)) {
newchain.flag = 0;
newchain.chain_id = infos.chain_id++;
newchain.chain_id = infos.field_id++;
newchain.evt = e;
newchain.triggering_controler = peffect->handler->current.controler;
newchain.triggering_effect = peffect;
......@@ -1696,7 +1698,6 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
}
}
*/
return FALSE;
}
case 8: {
......
......@@ -25,6 +25,7 @@ function c14466224.initial_effect(c)
end
function c14466224.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,2,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,1,nil)
end
......
......@@ -35,6 +35,8 @@ function c27243130.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e2:SetValue(c27243130.efilter)
......
......@@ -14,5 +14,5 @@ function c80032567.initial_effect(c)
c:RegisterEffect(e1)
end
function c80032567.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x22)*200
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x22)*200
end
......@@ -49,6 +49,8 @@ function c93483212.imop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c93483212.imfilter)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_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