Added various attack sounds, for different types of units

This commit is contained in:
Yair Morgenstern 2018-12-18 22:32:04 +02:00
parent 0491b21956
commit a1a2b89949
12 changed files with 75 additions and 32 deletions

View file

@ -169,6 +169,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
* [The Louvre](https://thenounproject.com/term/the-louvre/1577539/) By roundicons.com
* [Forbidden City](https://thenounproject.com/term/forbidden-city/1797540/) By 1516
* [Theatre](https://thenounproject.com/term/theatre/1780401/) By b farias
* [Tower of Pisa](https://thenounproject.com/search/?q=leaning%20tower%20of%20pisa&i=1002578) By Pedro Santos
* [Windmill](https://thenounproject.com/term/windmill/1705107/) By corpus delicti
* [Taj Mahal](https://thenounproject.com/term/taj-mahal/1907755/) By Felipe Alvarado
* [Observatory](https://thenounproject.com/term/observatory/1259/) By Nathan Driskell
@ -405,4 +406,11 @@ Sounds are from FreeSound.org and are either Creative Commons or Public Domain
* [fast simple chop 1](https://freesound.org/people/dave.des/sounds/127196/) By dave.dev as 'whoosh' for moving units around
* [Military kick](https://freesound.org/people/Dodgy%20C/sounds/72070/) By Dodgy C as 'promote' for unit promotions
* [Tank reload](https://freesound.org/people/KieranKeegan/sounds/418882/) By KieranKeegan as 'setup' for siege unit setup
* [Scribble_short](https://freesound.org/people/waldram/sounds/257518/) By waldram as 'policy' for adopting policies
* [Scribble_short](https://freesound.org/people/waldram/sounds/257518/) By waldram as 'policy' for adopting policies
* [Hit Impact](https://freesound.org/people/Mrguff/sounds/369711/) by Mrguff as 'throw' for catapult & trebuchet attacks
* [Slingshot fly by 2](https://freesound.org/people/saturdaysoundguy/sounds/394186/) by saturdaysoundguy as 'arrow' for arrow attacks
* [Metal hit slide](https://freesound.org/people/orginaljun/sounds/149102/) by orginaljun as 'nonmetalhit' for pre-metal melee sounds
* [klick_anlauf](https://freesound.org/people/jascha/sounds/16576/) By jascha as 'metalhit' for metal melee sounds
* [Horse Neigh 2](https://freesound.org/people/GoodListener/sounds/322450/) By GoodListener as 'horse' for cavalry attack sounds
* [machine gun 001 - loop](https://freesound.org/people/pgi/sounds/212602/) By pgi as 'machinegun' for machine gun attack sound
* [uzzi_full_single](https://freesound.org/people/Deganoth/sounds/348685/) By Deganoth as 'shot' for bullet attacks

View file

@ -4407,6 +4407,9 @@
Portuguese:"Teatro"
}
"Leaning Tower of Pisa":{}
"Free Great Person":{}
"Taj Mahal":{
Italian:"Taj Mahal"
Russian:"Тадж-Махал"

View file

@ -25,7 +25,8 @@
movement:2,
strength:5,
cost:25,
uniques:["Ignores terrain cost"]
uniques:["Ignores terrain cost"],
attackSound:"nonmetalhit"
},
{
name:"Warrior",
@ -35,7 +36,8 @@
cost: 40,
hurryCostModifier:20,
obsoleteTech:"Metal Casting",
upgradesTo:"Swordsman"
upgradesTo:"Swordsman",
attackSound:"nonmetalhit"
},
{
name:"Archer",
@ -47,7 +49,8 @@
hurryCostModifier:20,
requiredTech:"Archery",
obsoleteTech:"Machinery",
upgradesTo:"Crossbowman"
upgradesTo:"Crossbowman",
attackSound:"arrow"
},
{
name:"Bowman",
@ -61,7 +64,8 @@
obsoleteTech:"Machinery",
replaces:"Archer",
uniqueTo:"Babylon",
upgradesTo:"Crossbowman"
upgradesTo:"Crossbowman",
attackSound:"arrow"
},
{
name:"Work Boats",
@ -82,7 +86,8 @@
uniques:["Cannot enter ocean tiles"]
upgradesTo:"Caravel",
obsoleteTech:"Astronomy",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"nonmetalhit"
},
{
name:"Chariot Archer",
@ -96,7 +101,8 @@
upgradesTo:"Knight",
obsoleteTech:"Chivalry",
uniques:["No defensive terrain bonus","Rough terrain penalty"],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"arrow"
},
{
name:"Spearman",
@ -108,7 +114,8 @@
obsoleteTech:"Civil Service",
upgradesTo: "Pikeman",
uniques:["Bonus vs Mounted 50%"],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"metalhit"
},
{
name:"Hoplite",
@ -122,7 +129,8 @@
obsoleteTech:"Civil Service",
upgradesTo: "Pikeman",
uniques:["Bonus vs Mounted 50%"],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"metalhit"
},
@ -138,7 +146,8 @@
obsoleteTech:"Physics",
upgradesTo: "Trebuchet",
uniques:["Bonus vs City 200%","No defensive terrain bonus","Must set up to ranged attack"],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"throw"
},
{
name:"Ballista",
@ -153,7 +162,8 @@
obsoleteTech:"Physics",
upgradesTo: "Trebuchet",
uniques:["Bonus vs City 200%","No defensive terrain bonus","Must set up to ranged attack"],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"throw"
},
{
name:"Swordsman",
@ -165,7 +175,8 @@
upgradesTo:"Longswordsman",
obsoleteTech:"Steel",
requiredResource:"Iron",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"metalhit"
},
{
name:"Horseman",
@ -178,7 +189,8 @@
upgradesTo:"Knight",
obsoleteTech:"Metallurgy",
uniques:["Can move after attacking","No defensive terrain bonus","Penalty vs City 33%" ],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"horse"
},
{
name:"Companion Cavalry",
@ -193,7 +205,8 @@
obsoleteTech:"Metallurgy",
requiredResource:"Horses",
uniques:["Can move after attacking","No defensive terrain bonus","Penalty vs City 33%" ],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"horse"
},
// Medieval Era
@ -207,7 +220,8 @@
requiredTech:"Machinery",
upgradesTo:"Gatling Gun",
obsoleteTech:"Industrialization",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"arrow"
},
{
name:"Longbowman",
@ -222,7 +236,8 @@
requiredTech:"Machinery",
upgradesTo:"Gatling Gun",
obsoleteTech:"Industrialization",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"arrow"
},
{
name:"Trebuchet",
@ -235,7 +250,8 @@
obsoleteTech:"Chemistry",
upgradesTo:"Cannon",
uniques:["Bonus vs City 200%","No defensive terrain bonus","Must set up to ranged attack","Limited Visibility"],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"throw"
},
{
name:"Longswordsman",
@ -247,7 +263,8 @@
upgradesTo:"Musketman",
obsoleteTech:"Gunpowder",
requiredResource:"Iron",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"metalhit"
},
{
name:"Pikeman",
@ -259,7 +276,8 @@
uniques:["Bonus vs Mounted 50%"],
upgradesTo:"Musketman",
obsoleteTech:"Gunpowder",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"metalhit"
},
{
name:"Galleass",
@ -272,7 +290,8 @@
obsoleteTech:"Navigation",
upgradesTo:"Frigate",
uniques:["Cannot enter ocean tiles"]
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"arrow"
},
{
name:"Knight",
@ -285,7 +304,8 @@
upgradesTo:"Cavalry",
requiredResource:"Horses",
uniques:["Can move after attacking","No defensive terrain bonus","Penalty vs City 33%" ],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"horse"
},
{
name:"Camel Archer",
@ -301,7 +321,8 @@
upgradesTo:"Cavalry",
obsoleteTech:"Military science",
uniques:["Can move after attacking","No defensive terrain bonus"],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"arrow"
},
// Rennaisance Era
@ -341,7 +362,8 @@
requiredTech:"Gunpowder",
upgradesTo:"Rifleman"
obsoleteTech:"Rifling",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"shot"
},
{
name:"Musketeer",
@ -354,7 +376,8 @@
requiredTech:"Gunpowder",
upgradesTo:"Rifleman"
obsoleteTech:"Rifling",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"shot"
},
{
name:"Minuteman",
@ -368,7 +391,8 @@
upgradesTo:"Rifleman"
obsoleteTech:"Rifling",
uniques:["Bonus vs units in rough terrain 15%","Ignores terrain cost"]
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"shot"
},
{
name:"Frigate",
@ -392,7 +416,9 @@
requiredTech:"Metallurgy",
requiredResource:"Horses",
hurryCostModifier:20,
uniques:["Can move after attacking","No defensive terrain bonus","Penalty vs City 33%","Bonus vs Mounted 33%" ],
uniques:["Can move after attacking","No defensive terrain bonus",
"Penalty vs City 33%","Bonus vs Mounted 33%" ],
attackSound:"horse"
},
// Industrial Era
@ -406,7 +432,8 @@
rangedStrength:30,
cost: 225,
requiredTech:"Industrialization",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"machinegun"
},
{
name:"Rifleman",
@ -417,7 +444,8 @@
requiredTech:"Rifling",
obsoleteTech:"Replacable Parts",
upgradesTo:"Great War Infantry",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"shot"
},
{
name:"Cavalry",
@ -429,7 +457,8 @@
requiredResource:"Horses",
upgradesTo:"Landship",
uniques:["Can move after attacking","No defensive terrain bonus","Penalty vs City 33%" ],
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"horse"
},
{
name:"Artillery",
@ -512,7 +541,8 @@
strength:50,
cost: 320,
requiredTech:"Replacable Parts",
hurryCostModifier:20
hurryCostModifier:20,
attackSound:"shot"
},
/* Great people */

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -29,7 +29,7 @@ class BaseUnit : INamed, IConstruction, ICivilopedia {
var upgradesTo:String? = null
var replaces:String?=null
var uniqueTo:String?=null
var attackSound:String?=null
override val description: String
get(){

View file

@ -135,7 +135,9 @@ class BattleTable(val worldScreen: WorldScreen): Table() {
if(attackableEnemy==null || !attacker.unit.canAttack()) attackButton.disable()
else {
attackButton.onClick {
var attackSound = attacker.unit.baseUnit.attackSound
if(attackSound==null) attackSound="click"
attackButton.onClick(attackSound) {
attacker.unit.moveToTile(attackableEnemy.tileToAttackFrom)
battle.attack(attacker, defender)
worldScreen.shouldUpdate=true