Commit 0c94f01e authored by VanillaSalt's avatar VanillaSalt

fix

parent 78c0e939
......@@ -17,7 +17,8 @@ ClientField::ClientField() {
grave_act = false;
remove_act = false;
extra_act = false;
pzone_act = false;
pzone_act[0] = false;
pzone_act[1] = false;
deck_reversed = false;
for(int p = 0; p < 2; ++p) {
for(int i = 0; i < 5; ++i)
......@@ -63,7 +64,8 @@ void ClientField::Clear() {
grave_act = false;
remove_act = false;
extra_act = false;
pzone_act = false;
pzone_act[0] = false;
pzone_act[1] = false;
deck_reversed = false;
}
void ClientField::Initial(int player, int deckc, int extrac) {
......@@ -317,7 +319,8 @@ void ClientField::ClearCommandFlag() {
extra_act = false;
grave_act = false;
remove_act = false;
pzone_act = false;
pzone_act[0] = false;
pzone_act[1] = false;
}
void ClientField::ClearSelect() {
std::vector<ClientCard*>::iterator cit;
......
......@@ -64,7 +64,7 @@ public:
bool remove_act;
bool deck_act;
bool extra_act;
bool pzone_act;
bool pzone_act[2];
bool chain_forced;
ChainInfo current_chain;
bool last_chain;
......
......@@ -271,12 +271,18 @@ void Game::DrawMisc() {
driver->setTransform(irr::video::ETS_WORLD, im);
driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2);
}
if(dField.pzone_act) {
if(dField.pzone_act[0]) {
im.setTranslation(vector3df(matManager.vFields[60].Pos.X - (matManager.vFields[60].Pos.X - matManager.vFields[61].Pos.X)/2,
matManager.vFields[60].Pos.Y - (matManager.vFields[60].Pos.Y - matManager.vFields[62].Pos.Y)/2, 0.03f));
driver->setTransform(irr::video::ETS_WORLD, im);
driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2);
}
if(dField.pzone_act[1]) {
im.setTranslation(vector3df(matManager.vFields[128].Pos.X - (matManager.vFields[128].Pos.X - matManager.vFields[129].Pos.X)/2,
matManager.vFields[128].Pos.Y - (matManager.vFields[128].Pos.Y - matManager.vFields[130].Pos.Y)/2, 0.03f));
driver->setTransform(irr::video::ETS_WORLD, im);
driver->drawVertexPrimitiveList(matManager.vActivate, 4, matManager.iRectangle, 2);
}
if(dField.chains.size() > 1) {
for(size_t i = 0; i < dField.chains.size(); ++i) {
if(dField.chains[i].solved)
......
......@@ -980,7 +980,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if (pcard->location == LOCATION_EXTRA)
mainGame->dField.extra_act = true;
if (pcard->location == LOCATION_SZONE && pcard->sequence == 6)
mainGame->dField.pzone_act = true;
mainGame->dField.pzone_act[pcard->controler] = true;
}
mainGame->dField.reposable_cards.clear();
count = BufferIO::ReadInt8(pbuf);
......
......@@ -1566,6 +1566,8 @@ void card::filter_spsummon_procedure_g(uint8 playerid, effect_set* peset) {
effect* peffect = pr.first->second;
if(!peffect->is_available() || !peffect->check_count_limit(playerid))
continue;
if(current.controler != playerid && !(peffect->flag & EFFECT_FLAG_BOTH_SIDE))
continue;
effect* oreason = pduel->game_field->core.reason_effect;
uint8 op = pduel->game_field->core.reason_player;
pduel->game_field->core.reason_effect = peffect;
......
......@@ -2623,7 +2623,7 @@ int32 field::process_idle_command(uint16 step) {
filter_field_effect(EFFECT_SPSUMMON_PROC_G, &eset);
for(int32 i = 0; i < eset.size(); ++i) {
pcard = eset[i]->handler;
if(!eset[i]->check_count_limit(pcard->current.controler))
if(!eset[i]->check_count_limit(infos.turn_player))
continue;
if(pcard->current.controler != infos.turn_player && !(eset[i]->flag & EFFECT_FLAG_BOTH_SIDE))
continue;
......
......@@ -23,6 +23,7 @@ end
function c14735698.filter(c,e,tp,m)
if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end
if c:IsCode(21105106) then return c:fuscon() end
local mg=nil
if c.mat_filter then
mg=m:Filter(c.mat_filter,c)
......@@ -52,6 +53,11 @@ function c14735698.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,c14735698.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:IsCode(21105106) then
tc:fusop()
local mat=tc:GetMaterial()
Duel.ReleaseRitualMaterial(mat)
else
mg1:RemoveCard(tc)
if tc.mat_filter then
mg1=mg1:Filter(tc.mat_filter,nil)
......@@ -60,6 +66,7 @@ function c14735698.activate(e,tp,eg,ep,ev,re,r,rp)
local mat=mg1:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
......
......@@ -23,6 +23,7 @@ end
function c97211663.filter(c,e,tp,m)
if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
if c:IsCode(21105106) then return c:IsLocation(LOCATION_HAND) and c:fuscon() end
local mg=nil
if c.mat_filter then
mg=m:Filter(c.mat_filter,c)
......@@ -45,6 +46,11 @@ function c97211663.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,c97211663.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg1)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:IsCode(21105106) then
tc:fusop()
local mat=tc:GetMaterial()
Duel.ReleaseRitualMaterial(mat)
else
mg1:RemoveCard(tc)
if tc.mat_filter then
mg1=mg1:Filter(tc.mat_filter,nil)
......@@ -53,6 +59,7 @@ function c97211663.activate(e,tp,eg,ep,ev,re,r,rp)
local mat=mg1:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
......
......@@ -860,7 +860,7 @@ function Auxiliary.FOperationFunRep(f,cc,insf)
return
end
local sg=eg:Filter(f,nil)
if chkf==PLAYER_NONE or sg:GetCount()>=cc then
if chkf==PLAYER_NONE or sg:GetCount()==cc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=sg:Select(tp,cc,cc,nil)
Duel.SetFusionMaterial(g1)
......@@ -868,11 +868,9 @@ function Auxiliary.FOperationFunRep(f,cc,insf)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf)
local tc1=g1:GetFirst()
sg:RemoveCard(tc1)
if cc>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=sg:Select(tp,cc-1,cc-1,nil)
local g2=sg:Select(tp,cc-1,cc-1,g1:GetFirst())
g1:Merge(g2)
end
Duel.SetFusionMaterial(g1)
......
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