Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

alliance members can demolish all embassies #215

Closed
fireartist opened this Issue Mar 5, 2013 · 8 comments

Comments

Projects
None yet
3 participants
Contributor

fireartist commented Mar 5, 2013

An alliance member (not the leader) can demolish any and all embassies, and still remain in their alliance.
I don't think simply checking they have at least 1 colony with an Embassy would be sufficient.
I think we really need to require an Embassy on an empire's homeworld, to ensure they don't abandon / lose their only planet with an embassy.
And if they're in an alliance, they should not be able to change their homeworld unless the new planet already has an embassy.

Contributor

fireartist commented Mar 5, 2013

Currently, an alliance-leader cannot downgrade / demolish any of their embassies - which causes some complaints.
If we require an embassy on the homeworld, we could allow alliance-leaders to demolish other embassies without any problems.

Contributor

fireartist commented Mar 5, 2013

If we go ahead with my suggested fix, I think we'd need to automatically move all alliance members' embassy onto their homeworld if ones not already there. And we'd need to communicate with anyone who has no space available on their homeworld.

Member

icydee commented Mar 5, 2013

and we would need to make sure that the embassy is sufficient level and it
does not consume too many resources, hmm sounds like a bit of a problem.

(honest, I am not trying to be in a contradictory mood today!)

  • icydee

On 5 March 2013 10:19, fireartist notifications@github.com wrote:

If we go ahead with my suggested fix, I think we'd need to automatically
move all alliance members' embassy onto their homeworld if ones not already
there. And we'd need to communicate with anyone who has no space available
on their homeworld.


Reply to this email directly or view it on GitHubhttps://github.com/plainblack/Lacuna-Server-Open/issues/215#issuecomment-14432796
.

Kind Regards
Iain

Contributor

dmcbride commented Jun 20, 2014

And then if the homeworld blows up, such that the capitol moves, then what?

Will the capitol building require the embassy be built first if you're in an alliance?

I'd suggest adding a new column in the empire table for embassy level, recalcing it any time an embassy was built, upgraded, downgraded, demolished, or a planet (that has an embassy?) was abandoned or otherwise removed from an empire (could restrict the recalc to only times where the embassy's old level was equal to the empire's embassy level). Similar to tech level, but allowed to go down, too.

And then use the leader's empire's embassy level for determining number of empires in the alliance.

Member

icydee commented Jun 23, 2014

With the new SS code all of the voting that takes place will take place in
the Embassy, not the Parliament.

This means that if an alliance member deletes all their embassies, they can
no longer vote.

I think this is sufficient deterrent against someone deleting all their
embassies, if they do, they are a none-voting alliance member.

I suggest we don't do anything about this issue for now.

  • icydee

On 20 June 2014 18:45, Darin McBride notifications@github.com wrote:

And then if the homeworld blows up, such that the capitol moves, then what?

Will the capitol building require the embassy be built first if you're in
an alliance?

I'd suggest adding a new column in the empire table for embassy level,
recalcing it any time an embassy was built, upgraded, downgraded,
demolished, or a planet (that has an embassy?) was abandoned or otherwise
removed from an empire (could restrict the recalc to only times where the
embassy's old level was equal to the empire's embassy level). Similar to
tech level, but allowed to go down, too.

And then use the leader's empire's embassy level for determining number of
empires in the alliance.


Reply to this email directly or view it on GitHub
#215 (comment)
.

Kind Regards
Iain

Contributor

dmcbride commented Jun 23, 2014

I'd agree for those other than the leader (though I'm now realising that auto-vote code will have to scan an empire for the first available embassy...). But the leader would still not be able to demolish extraneous embassies with "do nothing."

Rather than the above, for the leader we could check if the level of the embassy after the requested downgrade or demolish would still support the alliance. That can be done entirely in the database:

perl5.12.1 -MLacuna -E '$e=Lacuna->db->resultset("Lacuna::DB::Result::Building")->search({"body.empire_id"=>2,"me.class"=>"Lacuna::DB::Result::Building::Embassy",body_id=>{"!=",182387}},{join=>"body",order_by=>{-desc=>"level"}})->single;say $e->level'
30

Of course, if I put this in DB/Result/Empire.pm for figuring out the current embassy level, it'd use variables, not hardcodes, but I only have the one empire on my test server :)

Member

icydee commented Jun 23, 2014

yes that's eminently doable.

On 23 June 2014 16:34, Darin McBride notifications@github.com wrote:

I'd agree for those other than the leader (though I'm now realising that
auto-vote code will have to scan an empire for the first available
embassy...). But the leader would still not be able to demolish extraneous
embassies with "do nothing."

Rather than the above, for the leader we could check if the level of the
embassy after the requested downgrade or demolish would still support the
alliance. That can be done entirely in the database:

perl5.12.1 -MLacuna -E '$e=Lacuna->db->resultset("Lacuna::DB::Result::Building")->search({"body.empire_id"=>2,"me.class"=>"Lacuna::DB::Result::Building::Embassy",body_id=>{"!=",182387}},{join=>"body",order_by=>{-desc=>"level"}})->single;say $e->level'
30

Of course, if I put this in DB/Result/Empire.pm for figuring out the
current embassy level, it'd use variables, not hardcodes, but I only have
the one empire on my test server :)


Reply to this email directly or view it on GitHub
#215 (comment)
.

Kind Regards
Iain

Contributor

dmcbride commented May 20, 2015

Empire stats now return the building ID of the highest level non-flat embassy, so that scripts can easily find an embassy to vote at. Alliance leaders can demolish spare embassies, and can downlevel their highest embassy as long as they still have room for all the allies currently in the alliance. Parliament voting can now be done via embassy, though it can also still be done via parliaments for now.

No new column added to the empire.

Given the additional functionality found in the embassy, and the public direction of eliminating parliament buildings, I think we can close this.

@dmcbride dmcbride closed this May 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment