Added unit sets for the "not a default faction" case composed by Doc Paterson.

If any faction is not one of the default factions (e.g. Khalifate)
it gets these units now instead of both factions getting no units
at all. If the other faction is a default one it still gets the set
composed for it in particular in the same game.

(bug #19281)

http://forums.wesnoth.org/viewtopic.php?p=518542&sid=73489ef47cba8b3a39ac219353f64613#p518542
This commit is contained in:
Anonymissimus 2012-01-14 22:08:45 +00:00
parent 341e417bba
commit 18b67149a9

View file

@ -105,13 +105,12 @@
end
if recruits_match() and leader_matches() then
wesnoth.set_variable("p" .. tostring(side_number) .. "_faction", multiplayer_side.id)
return true
return
end
end
end
if detect_faction(1) then wesnoth.set_variable("detection_successful", detect_faction(2))
else wesnoth.set_variable("detection_successful", false)
end
detect_faction(1)
detect_faction(2)
>>
[/lua]
@ -123,12 +122,6 @@
[event]
name=place_units
[filter_condition]
[variable]
name=detection_successful
equals=yes
[/variable]
[/filter_condition]
[switch]
variable=p1_faction
@ -519,6 +512,76 @@
[/modifications]
[/unit]
[/case]
[else]
[unit]
side=1
type=Young Ogre
id=Big Baby Bo
name= _ "Big Baby Bo"
x,y=24,4
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
{TRAIT_DIM}
[/modifications]
[/unit]
[unit]
side=1
type=Giant Rat
x,y=25,3
[modifications]
{TRAIT_STRONG}
{TRAIT_RESILIENT}
{TRAIT_QUICK}
[/modifications]
[/unit]
[unit]
side=1
type=Troll Whelp
x,y=25,5
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TRAIT_INTELLIGENT}
{TRAIT_QUICK}
[/modifications]
[/unit]
[unit]
side=1
type=Mudcrawler
x,y=1,2
[modifications]
{TRAIT_QUICK}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
[unit]
side=1
type=Fire Guardian
x,y=2,1
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TRAIT_FEARLESS}
{TRAIT_SLOW}
[/modifications]
[/unit]
[unit]
side=1
type=Giant Scorpion
id=Clockwork Scorpion
name= _ "Clockwork Scorpion"
x,y=1,1
{IS_LOYAL}
[modifications]
{TRAIT_MECHANICAL}
{TRAIT_LOYAL}
{TRAIT_SLOW}
[/modifications]
[/unit]
[/else]
[/switch]
[switch]
@ -910,6 +973,76 @@
[/modifications]
[/unit]
[/case]
[else]
[unit]
side=2
type=Young Ogre
id=Baby Baby Dro
name= _ "Big Baby Dro"
x,y=7,20
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
{TRAIT_DIM}
[/modifications]
[/unit]
[unit]
side=2
type=Giant Rat
x,y=10,23
[modifications]
{TRAIT_STRONG}
{TRAIT_RESILIENT}
{TRAIT_QUICK}
[/modifications]
[/unit]
[unit]
side=2
type=Troll Whelp
x,y=9,23
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TRAIT_INTELLIGENT}
{TRAIT_QUICK}
[/modifications]
[/unit]
[unit]
side=2
type=Fire Guardian
x,y=30,27
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
{TRAIT_FEARLESS}
{TRAIT_SLOW}
[/modifications]
[/unit]
[unit]
side=2
type=Mudcrawler
x,y=29,27
[modifications]
{TRAIT_QUICK}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
[unit]
side=2
type=Giant Scorpion
id=Clockwork Scorpion
name= _ "Clockwork Scorpion"
x,y=28,24
{IS_LOYAL}
[modifications]
{TRAIT_MECHANICAL}
{TRAIT_LOYAL}
{TRAIT_SLOW}
[/modifications]
[/unit]
[/else]
[/switch]
[/event]