Coder Social home page Coder Social logo

textcom's Introduction

textcom

A Text-Based Roguelike in Python, based on XCOM: Enemy Unknown

Running the game:

Please have Python 3.x installed (where x is any number, just make sure it's 3.something, preferably 3.4.3). You can find a download at www.python.org/downloads Either double click on the program to run it in Terminal/IDLE/Command Prompt, or right click and go Open With...IDLE Shell.

If you already have it installed but aren't sure what version it is, just run IDLE if you can, and it should tell you. If you don't have Python 3.x, please upgrade to it, because the game won't run as well and might crash.

How to play:

On your turn, a list of takeable actions will be shown. Enter the number of the action you wish to take. It's that simple. As you kill more aliens, you can level up your soldier, gaining loot and bonus stats, to help you kill more aliens faster. Every 5 rooms there will be an upgrade shop, where you can buy new weapons and augment your soldier.

Next steps:

Perks. More weapons. Weapon upgrades.

Thanks to:

Everyone who forked this and submitted bug reports! Big thanks to /u/net_goblin, who, without the help of, the game would not be as optimised as it is.

-/u/TachyonNZ

textcom's People

Contributors

flimberger avatar tachyonnz avatar voidref avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

textcom's Issues

I see that you have never beat this game ...

Index out of range exception when finishing.

Megan Fox: "Eat this!"
*W-W-Whap!*
5 damage!
(Muton) Uber Jeffery The Muton died!
Megan Fox: "Recovered a Nano-Serum!"
HP: 24  AP: 10  Ammo: 2
Colonel 'Seismic' Fox is in FULL cover.
[a]  (1 AP) Advance
[r]  (8 AP) Reload
[d] Reload + Advance
[e] End turn
> e
Colonel 'Seismic' Fox is out of AP!
HP: 24  AP: 19  Ammo: 2
Colonel 'Seismic' Fox is in FULL cover.
[a]  (1 AP) Advance
[r]  (8 AP) Reload
[d] Reload + Advance
[e] End turn
> d
Traceback (most recent call last):
  File "textcom.py", line 1830, in <module>
    playerTurn()
  File "textcom.py", line 1423, in playerTurn
    prompt_player(actions).perform()
  File "textcom.py", line 1118, in perform
    advance_action.perform()
  File "textcom.py", line 1030, in perform
    if not "Drop Zone" in room[roomNo]:
IndexError: list index out of range

Thin mint grenade toss crash

(Thinman) Soldier X. Smith spotted!
(Thinman) Soldier F. Hinman spotted!
(Thinman) Warrior X. Lmao spotted!
(Thinman) Soldier X. Smith moves to Half cover!
(Thinman) Soldier F. Hinman moves to Full cover!
(Thinman) Warrior X. Lmao can't find any cover!

Rookie Green is out of AP!
HP: 2   AP: 13
Rookie Green is in FULL cover.
[1]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Thinman) Soldier X. Smith - 5 HP - (60%)
[2]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Thinman) Soldier F. Hinman - 5 HP - (40%)
[3]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Thinman) Warrior X. Lmao - 7 HP - (90%)
[4]  (6 AP) Overwatch
[5]  (10 AP) (2 dmg) (10 AP) Use Frag Grenade
[6]  (3 AP) Reposition
[7]  (1 AP) Hunker down
[8] End turn
> 3
John Green: "AAGGHH!!!"
*Dakkadakkadakka*
2 damage!
HP: 2   AP: 7
Rookie Green is in FULL cover.
[1]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Thinman) Soldier X. Smith - 5 HP - (60%)
[2]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Thinman) Soldier F. Hinman - 5 HP - (40%)
[3]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Thinman) Warrior X. Lmao - 5 HP - (90%)
[4]  (6 AP) Overwatch
[5]  (3 AP) Reposition
[6]  (1 AP) Hunker down
[7] End turn
> 3
John Green: "Take this!"
*Dakkadakkadakka*
 Missed!
HP: 2   AP: 1
Rookie Green is in FULL cover.
[1]  (1 AP) Hunker down
[2] End turn
> 1
John Green: "Taking cover!"
Rookie Green is out of AP!

--------------Alien Activity!--------------

(Thinman) Soldier X. Smith uses Alien Grenade!
**BLAM!**
3 damage!
Traceback (most recent call last):
  File "textcom.py", line 1756, in <module>
    alienTurn(soldier)
  File "textcom.py", line 1494, in alienTurn
    nade(alium)
  File "textcom.py", line 1447, in nade
    checkPlayerDead()
NameError: name 'checkPlayerDead' is not defined
voidref@AlSi ~/s/textcom> 

Just a guess, missing 'self.' ?

AP miscalc on reload+advance

(Sectoid) Guard Glarp Glop died!
HP: 5   AP: 8   Ammo: 0
Rookie Kerman is in FULL cover.
[a]  (1 AP) Advance
[r]  (8 AP) Reload
[d]  (9 AP) Reload + Advance
[e] End turn
> d
Traceback (most recent call last):
  File "textcom.py", line 1775, in <module>
    playerTurn()
  File "textcom.py", line 1390, in playerTurn
    prompt_player(actions).perform()
  File "textcom.py", line 1086, in perform
    advance_action.perform()
  File "textcom.py", line 996, in perform
    self._calc_ap()
  File "textcom.py", line 978, in _calc_ap
    format(self.name))
Exception: Not enough AP to perform action 'Advance'

Reload is offered even when we have already reloaded

At the end of a room, when we can reload, if we do, the option still exists to reload.

(Thin Man) Overseer S. Human died!
Colonel Bradford is out of AP!
Alien Activity!
HP - 3
AP - 18
1: "Advance"
2: "(8AP) Reload"
#2

HP - 3
AP - 18
1: "Advance"
2: "(8AP) Reload"

Grenade causes crash

--------------Alien Activity!--------------

(Sectoid) Soldier Glurp Glopperson uses Alien Grenade!
**BLAM!**
3 damage!
Traceback (most recent call last):
  File "textcom.py", line 1861, in <module>
    alienTurn(soldier)
  File "textcom.py", line 1577, in alienTurn
    nade(alium)
  File "textcom.py", line 1531, in nade
    soldier.checkDeath()
AttributeError: 'Soldier' object has no attribute 'checkDeath'

Reported hit chances incorrect?

I put some debug output in the fire_at() function, and it seems the hit chances reported are often incorrect

(Sectoid) Guard Glop Glommery fires at Rookie French (47%)(Plasma Pistol)
chance = (aim)67 - (cover)40 + (scope:10)True + (carbine:10)False
Final hit chance: 37
*Whap*
3 damage!

Key bug

I'm running this on a Mac, and after changing some things to make it work (I am considering doing a PR to the repo for them), I get this error

voidref@AlSi ~/s/textcom> ./textcom.py
Bradford: "Welcome Commander. We've discovered an Alien Base, and it's your job to send someone out to deal with it."
Bradford: "Choose a soldier from the 3 below to go on the mission."
1:
Rookie Violet Dan Voorn - 5 HP - 62 Aim
Items: Ballistic Rifle, Nano Serum, Nano Serum

2:
Rookie Becks Nerman - 4 HP - 58 Aim
Items: Ballistic Carbine, Scope, Nano Serum

3:
Rookie Peter Beardly - 3 HP - 67 Aim
Items: Ballistic Carbine, Nano Serum, Frag Grenade
#3

Peter Beardly: "Ready for duty, Commander!"
HP - 3
AP - 15
1: "Advance"
2: "(8AP) Reload"
#1

Peter Beardly: "Roger that, moving up!"
Traceback (most recent call last):
File "./textcom.py", line 914, in
playerTurn()
File "./textcom.py", line 320, in playerTurn
checkspot(roomNo)
File "./textcom.py", line 286, in checkspot
p(0,room[roomNo][i].name()+" spotted!")
File "./textcom.py", line 266, in name
return (" ("+self.species+") "+aranks[self.rank]+" "+self.fName+" "+self.lName)
KeyError: -1.0

I'm not as familiar with Python as I should be, so I am not sure why self.rank is -1.0 somehow (I think)

Typo for attribute

Violet Civilian: "Reached an access point, Commander. Requesting additional goods!"
Violet Civilian: "We only have a short time before they close the access point!"
Fragments: 63
Elerium: 31
Meld: 30
Alloy: 12
Time: 60
1: "Advance"
2: "(60 Time) (15m) Insta-Genemod: Depth Perception (+5 aim)"
3: "(60 Time) (15m) Micro-Augment: Reflex Servomotors (+2 AP)"
5: "(60 Time) (20m) Insta-Genemod: Muscle Regeneration (+5 HP)"
6: "(60 Time) (20m) Micro-Augment: Grenade Launcher (+2 Frag Grenades)"
7: "(40 Time) (20e) (40f) Get Laser Rifle"
(~4dmg), infinite ammo
8: "(40 Time) (10e) (30f) Get Laser Carbine"
(~3dmg), infinite ammo, +10% aim
9: "(30 Time) (10m) (10f) Get Nano Serum"
10: "(30 Time) (20f) (4a) Get Frag Grenade"
11: "(20 Time) (5m) Recuperate (+1 HP)"
12: "(20 Time) Reload Weapon"
13: "(60 Time) Advance (Skip this Drop Zone)"
#7

LaserRifle
Fragments: 23
Elerium: 11
Meld: 30
Alloy: 12
Time: 60
1: "Advance"
2: "(60 Time) (15m) Insta-Genemod: Depth Perception (+5 aim)"
3: "(60 Time) (15m) Micro-Augment: Reflex Servomotors (+2 AP)"
5: "(60 Time) (20m) Insta-Genemod: Muscle Regeneration (+5 HP)"
6: "(60 Time) (20m) Micro-Augment: Grenade Launcher (+2 Frag Grenades)"
7: "(30 Time) (10m) (10f) Get Nano Serum"
8: "(30 Time) (20f) (4a) Get Frag Grenade"
9: "(20 Time) (5m) Recuperate (+1 HP)"
10: "(20 Time) Reload Weapon"
11: "(60 Time) Advance (Skip this Drop Zone)"
#5

HPBonus
Traceback (most recent call last):
File "./textcom.py", line 1510, in
playerTurn()
File "./textcom.py", line 807, in playerTurn
soldier.HP += 5
AttributeError: 'Soldier' object has no attribute 'HP'

This is kinda what sucks about loose type languages, you don't know you have a problem until it crashes on someone.

Maybe I'll port this to Swift! ;)

Alien overwatch out of order

I feel like the soldier should say they are moving to full cover before they are shot at.

1: "Overwatch"
2: "(3AP) Reposition"
3: "Hunker Down"
4: "End Turn"
#2

(Sectoid) Soldier Glerp Glommery reacts!
Missed!
David Green: "Moving to Full cover!"

Bradford speaks from the grave

If you lose as Bradford, he does not give a shit, and does the post-mortem anyway.

 Bradford: "Taking cover!"
Central Officer Bradford is out of AP!
Alien Activity!
(Muton) Overseer  Von Mooter fires at Central Officer Bradford(5%)
5 damage!
Central Officer Bradford was killed!
Bradford: "Commander, our unit was killed."
Bradford: "We were able to recover some materials, however."

Got two weapon drops from one kill

HP: -3  AP: 9   Ammo: 1
Rookie Hunt is in FULL cover.
[1]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Thinman) Warrior V. Anderson - 7 HP - (58%)
[2]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Thinman) Guard P. Human - 4 HP - (38%)
[3]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Sectoid) Trooper Glump Glopperson - 2 HP - (58%)
[o]  (6 AP) Overwatch
[r]  (8 AP) Reload
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> 3
Dylan Hunt: "Take this!"
CRITICAL!
*W-W-Whap!*
8 damage!
(Sectoid) Trooper Glump Glopperson died!
Dylan Hunt: "Recovered a Light Plasma Rifle!"
Replace your Light Plasma Rifle?
[y] Yes
[n] No
>> y
Dylan Hunt: "Recovered a Plasma Rifle!"
Replace your Light Plasma Rifle?
[y] Yes
[n] No
>> y

I think we need some unit tests...

Nobody likes writing tests, but python's inability to check for valid symbols before runtime seems to point to the need for 100% test coverage.

Bradford does not get additional goods

Is this on purpose because of how OP Bradford is?

 Bradford: "Commander! I advise you to reconsider!"
 Bradford: "Reached an access point, Commander. Requesting additional goods!"
 Bradford: "We only have a short time before they close the access point!"
HP - 2
AP - 13
1: "(~5dmg)(6AP) Fire Bradford's Pistol : Officer Gloop Gloopley - 10 HP - 95%"
2: "(~5dmg)(6AP) Fire Bradford's Pistol : Soldier Glurp Glarp - 3 HP - 95%"
3: "(~5dmg)(6AP) Fire Bradford's Pistol : Trooper Gleep Glopperson - 5 HP - 95%"
4: "Overwatch"
5: "(+4HP)(10AP) Use Nano Serum"
6: "(3AP) Reposition"
7: "Hunker Down"
8: "End Turn"

Aliens overwatch is sticky

This happend:

Alien Activity!
(Muton) Commander Holk Jefferson runs to Half cover!
(Thin Man) Supreme Commander P. Anderson runs to Half cover!
HP - 7
AP - 18
1: "(8AP) Reload Weapon"
2: "(2dmg)(10AP) Throw Frag Grenade"
3: "(4dmg)(15AP) Throw Alien Grenade"
4: "(3AP) Reposition"
5: "End Turn"
#1

HP - 7
AP - 10
1: "(~5dmg)(6AP) Fire Light Plasma Rifle : Commander Holk Jefferson - 12 HP - 98%"
2: "(~5dmg)(6AP) Fire Light Plasma Rifle : Supreme Commander P. Anderson - 11 HP - 98%"
3: "Overwatch"
4: "(2dmg)(10AP) Throw Frag Grenade"
5: "(3AP) Reposition"
6: "End Turn"
#2

Central Officer Bradford: "WHAT HAVE YOU DONE?!"
Whap-whap-whap
5 damage!
HP - 7
AP - 4
1: "Overwatch"
2: "(3AP) Reposition"
3: "End Turn"
#2

(Muton) Commander Holk Jefferson reacts!
Missed!
(Thin Man) Supreme Commander P. Anderson reacts!
4 damage!
Central Officer Bradford: "Moving to...wait...that's CLOSE RANGE!"

I think the aliens went on overwatch, then moved, which should have taken them off overwatch, but didn't.

Strange checkpoint crash

> Peter Van Doorn: "Reached an access point, Commander. Requesting additional goods!"
Peter Van Doorn: "We only have a short time before the aliens close it off!"
Fragments: 28
Elerium: 23
Meld: 14
Alloy: 2
Time: 60
1: "Advance"
2: "(30 Time) (10m) (10f) Get Nano Serum"
3: "(20 Time) (5m) Recuperate (+1 HP)"
4: "(20 Time) Reload Weapon"
5: "(60 Time) Advance (Skip this Drop Zone)"
> 2
selected option 2
Nano Serum fabricated!
Fragments: 18
Elerium: 23
Meld: 4
Alloy: 2
Time: 40
1: "Advance"
2: "(20 Time) Reload Weapon"
3: "(40 Time) Advance (Skip this Drop Zone)"
> 2
selected option 2
Weapon reloaded!
Fragments: 18
Elerium: 23
Meld: 4
Alloy: 2
Time: 20
1: "Advance"
2: "(20 Time) Reload Weapon"
3: "(20 Time) Advance (Skip this Drop Zone)"
> 1
selected option 1
Peter Van Doorn: "All out of time! I'll have to keep moving!"
(Thinman) Soldier V. Clark spotted!
(Thinman) Soldier V. Clark moves to Half cover!

General Van Doorn is out of AP!
HP: 2   AP: 11
General Van Doorn is in FULL cover.
Traceback (most recent call last):
  File "textcom.py", line 1740, in <module>
    playerTurn()
  File "textcom.py", line 1348, in playerTurn
    if item.use_ap_costs > 0 and soldier.ap >= item.use_ap_costs:
AttributeError: 'int' object has no attribute 'use_ap_costs'

hooray for weak types and scripting languages!

XCOM Overwatch will cancel alien turn

I got an overwatch on a moving alien and the alien turn was ended prematurely, i.e. the rest of the aliens didn't move.

--------------Alien Activity!--------------

(Floater) Officer Dirk Stroganov went on overwatch!
(Sectoid) Trooper Glerp Glupple went on overwatch!

--------------XCOM Turn--------------

HP: 16  AP: 18  Ammo: 3
Sergeant 'Mad Dog' Hunt is in FULL cover.
[1]  (6 AP) (~6 dmg) Fire Plasma Rifle at (Floater) Officer Dirk Stroganov - 9 HP - (58%)
[2]  (6 AP) (~6 dmg) Fire Plasma Rifle at (Sectoid) Trooper Glerp Glupple - 5 HP - (58%)
[o]  (6 AP) Overwatch
[r]  (8 AP) Reload
[G]  (15 AP) (4 dmg) (15 AP) Use Alien Grenade
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> 1
Dylan Hunt: "Suck on this!"
*Whap-whap-whap!*
6 damage!
HP: 16  AP: 12  Ammo: 2
Sergeant 'Mad Dog' Hunt is in FULL cover.
[1]  (6 AP) (~6 dmg) Fire Plasma Rifle at (Floater) Officer Dirk Stroganov - 3 HP - (58%)
[2]  (6 AP) (~6 dmg) Fire Plasma Rifle at (Sectoid) Trooper Glerp Glupple - 5 HP - (58%)
[o]  (6 AP) Overwatch
[r]  (8 AP) Reload
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> 1
Dylan Hunt: "Take this!"
*Whap-whap-whap!*
 Missed!
HP: 16  AP: 6   Ammo: 1
Sergeant 'Mad Dog' Hunt is in FULL cover.
[1]  (6 AP) (~6 dmg) Fire Plasma Rifle at (Floater) Officer Dirk Stroganov - 3 HP - (58%)
[2]  (6 AP) (~6 dmg) Fire Plasma Rifle at (Sectoid) Trooper Glerp Glupple - 5 HP - (58%)
[o]  (6 AP) Overwatch
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> o
Dylan Hunt: "Got it, on Overwatch."
Sergeant 'Mad Dog' Hunt is out of AP!

--------------Alien Activity!--------------

(Floater) Officer Dirk Stroganov runs to Half cover!
Sergeant 'Mad Dog' Hunt reacts!
*Whap-whap-whap!*
6 damage!
(Floater) Officer Dirk Stroganov died!

--------------XCOM Turn--------------

Notice that (Sectoid) Trooper Glerp Glupple didn't get to do anything during the alien turn.

Next encounter after checkpoint skips prologue

David Green: "Reached an access point, Commander. Requesting additional goods!"
David Green: "We only have a short time before they close the access point!"
Fragments: 83
Elerium: 72
Meld: 72
Alloy: 18
Time: 60
1: "Advance"
2: "(60 Time) (15m) Insta-Genemod: Depth Perception (+5 aim)"
3: "(60 Time) (15m) Micro-Augment: Reflex Servomotors (+2 AP)"
5: "(60 Time) (20m) Micro-Augment: Grenade Launcher (+2 Frag Grenades)"
6: "(40 Time) (20e) (40f) Get Laser Rifle"
     (~4dmg), infinite ammo
7: "(40 Time) (10e) (30f) Get Laser Carbine"
     (~3dmg), infinite ammo, +10% aim
8: "(30 Time) (10m) (10f) Get Nano Serum"
9: "(30 Time) (20f) (4a) Get Frag Grenade"
10: "(20 Time) (5m) Recuperate (+1 HP)"
11: "(20 Time) Reload Weapon"
12: "(60 Time) Advance (Skip this Drop Zone)"
#2
AimBonus
HP - 11
AP - 14
1: "(~4dmg)(6AP) Fire Beam Rifle : Overseer Algernon Wolf - 11 HP - 83%"
2: "Overwatch"
3: "(3AP) Reposition"
4: "Hunker Down"
5: "End Turn"

Threw grenate ... only sound effects happened

I put in a lot of context, just in case it helps

Alien Activity!
(Sectoid) Soldier Glarp Glommery runs to Full cover!
(Sectoid) Soldier Glarp Glommery runs to Half cover!
HP - 13
AP - 11
1: "(~3dmg)(6AP) Fire Ballistic Rifle : Soldier Glarp Glommery - 3 HP - 53%"
2: "Overwatch"
3: "(2dmg)(10AP) Throw Frag Grenade"
4: "(3AP) Reposition"
5: "Hunker Down"
6: "End Turn"
#1
David Green: "Welcome to Earth!"
*Dakkadakkadakka!*
Missed!
HP - 13
AP - 5
1: "Overwatch"
2: "(3AP) Reposition"
3: "Hunker Down"
4: "End Turn"
#2
David Green: "Moving to Full cover!"
(Sectoid) Soldier Glarp Glommeryis flanked!
HP - 13
AP - 2
1: "Overwatch"
2: "Hunker Down"
3: "End Turn"
#2
David Green: "Taking cover!"
Rookie Green is out of AP!
Alien Activity!
(Sectoid) Soldier Glarp Glommery runs to Full cover!
(Sectoid) Soldier Glarp Glommery went on overwatch!
HP - 13
AP - 11
1: "(~3dmg)(6AP) Fire Ballistic Rifle : Soldier Glarp Glommery - 3 HP - 33%"
2: "Overwatch"
3: "(2dmg)(10AP) Throw Frag Grenade"
4: "(3AP) Reposition"
5: "Hunker Down"
6: "End Turn"
#3
BAM!
HP - 13
AP - 1
1: "Overwatch"
2: "Hunker Down"
3: "End Turn"

Alien grenades don't kill me

Got hit with an Alien grenade, still alive with 0hp:

Dylan Hunt: "Welcome to Earth!"
*W-W-Whap!*
 Missed!
HP: 3   AP: 6   Ammo: 3
Rookie Hunt is in FULL cover.
[1]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Sectoid) Peon Glip Glopperson - 2 HP - (38%)
[2]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Sectoid) Peon Gloop Glommery - 2 HP - (58%)
[o]  (6 AP) Overwatch
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> h
Dylan Hunt: "Taking cover!"
Rookie Hunt is out of AP!

--------------Alien Activity!--------------

(Sectoid) Peon Glip Glopperson runs to Half cover!
(Sectoid) Peon Gloop Glommery uses Alien Grenade!
**BLAM!**
3 damage!

--------------XCOM Turn--------------

HP: 0   AP: 15  Ammo: 3
Rookie Hunt is in HALF cover.
[1]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Sectoid) Peon Glip Glopperson - 2 HP - (58%)
[2]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Sectoid) Peon Gloop Glommery - 2 HP - (58%)
[o]  (6 AP) Overwatch
[r]  (8 AP) Reload
[g]  (10 AP) (2 dmg) (10 AP) Use Frag Grenade
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn

Same game, next grenade, still alive:

HP: 0   AP: 3   Ammo: 0
Rookie Hunt is in FULL cover.
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> h
Dylan Hunt: "Taking cover!"
Rookie Hunt is out of AP!

--------------Alien Activity!--------------

(Sectoid) Guard Glop Glupple uses Alien Grenade!
**BLAM!**
3 damage!

--------------XCOM Turn--------------

HP: -3  AP: 15  Ammo: 0
Rookie Hunt is in HALF cover.
[r]  (8 AP) Reload
[g]  (10 AP) (2 dmg) (10 AP) Use Frag Grenade
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn

Hunker unavailble sometimes

I don't know what causes this:

Peter Van Doorn: "I'm the Ops team?"
HP: 6   AP: 14
General Van Doorn is in HALF cover.
[a]  (1 AP) Advance
[r]  (8 AP) Reload
[e] End turn
> a
(Sectoid) Peon Glorp Glop spotted!
(Sectoid) Peon Glorp Glop moves to Half cover!

General Van Doorn is out of AP!
HP: 6   AP: 14
General Van Doorn is in HALF cover.
[1]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Sectoid) Peon Glorp Glop - 2 HP - (60%)
[o]  (6 AP) Overwatch
[g]  (10 AP) (2 dmg) (10 AP) Use Frag Grenade
[s]  (10 AP) (+4 HP) (10 AP) Use Nano-Serum
[p]  (3 AP) Reposition
[e] End turn
> s
HP restored.
HP: 10  AP: 4
General Van Doorn is in HALF cover.
[p]  (3 AP) Reposition
[e] End turn
> 

Alien's ghosts run to half cover

I killed an alien on overwatch, but his lifeless body made it to half cover:

Alien Activity!
(Sectoid) Peon Glup Gloopley runs to Full cover!
HP - 4
AP - 13
1: "(8AP) Reload Weapon"
2: "(2dmg)(10AP) Throw Frag Grenade"
3: "(3AP) Reposition"
4: "End Turn"
#1

HP - 4
AP - 5
1: "Overwatch"
2: "(3AP) Reposition"
3: "End Turn"
#2

Nina Beegle: "Moving to Full cover!"
(Sectoid) Peon Glup Gloopleyis flanked!
HP - 4
AP - 2
1: "Overwatch"
2: "Hunker Down"
3: "End Turn"
#1

Nina Beegle: "Got it, on Overwatch."
Rookie Beegle is out of AP!
Alien Activity!
(Sectoid) Peon Glup Gloopley runs to Full cover!
Rookie Beegle reacts!
2 damage!
(Sectoid) Peon Glup Gloopley died!
(Sectoid) Peon Glup Gloopley runs to Half cover!
HP - 4
AP - 13
1: "Advance"
2: "(8AP) Reload"

[Feature to be added] AI Types

Agressive, Neutral and Defensive AI for each species.

Sectoids - Defensive
Thinmints - Neutral
Floaters - Aggro
Mutons - Aggro

I got lots of lucky hits on the Uber Muton at the end, 3 Crits, while he just ran to different cover. Never took a shot at me.

Return of the impossible overwatch

--------------Alien Activity!--------------

(Sectoid) Guard Glurp Glopperson went on overwatch!

--------------XCOM Turn--------------

HP: 7   AP: 11
General Van Doorn is in HALF cover.
[1]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Sectoid) Guard Glurp Glopperson - 3 HP - (70%)
[2]  (6 AP) Overwatch
[3]  (8 AP) Reload
[4]  (10 AP) (+4 HP) (10 AP) Use Nano-Serum
[5]  (3 AP) Reposition
[6]  (1 AP) Hunker down
[7] End turn
> 4
HP restored.
HP: 11  AP: 1
General Van Doorn is in HALF cover.
[1]  (1 AP) Hunker down
[2] End turn
> 1
Peter Van Doorn: "Taking cover!"
General Van Doorn is out of AP!

--------------Alien Activity!--------------

(Sectoid) Guard Glurp Glopperson fires at General Van Doorn (34%)(Plasma Pistol)
*Whap*
 Missed!

--------------XCOM Turn--------------

HP: 11  AP: 11
General Van Doorn is in HALF cover.
[1]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Sectoid) Guard Glurp Glopperson - 3 HP - (70%)
[2]  (6 AP) Overwatch
[3]  (8 AP) Reload
[4]  (3 AP) Reposition
[5]  (1 AP) Hunker down
[6] End turn
> 1
Peter Van Doorn: "Get down there!"
*Dakkadakkadakka*
 Missed!
HP: 11  AP: 5
General Van Doorn is in HALF cover.
[1]  (3 AP) Reposition
[2]  (1 AP) Hunker down
[3] End turn
> 1
(Sectoid) Guard Glurp Glopperson reacts!
*Whap*
3 damage!
Peter Van Doorn: "Come on! I won't go down without a fight."
HP: 8   AP: 2
General Van Doorn is in FULL cover.
[1]  (1 AP) Hunker down
[2] End turn
> 1
Peter Van Doorn: "Taking cover!"
General Van Doorn is out of AP!

--------------Alien Activity!--------------

(Sectoid) Guard Glurp Glopperson fires at General Van Doorn (14%)(Plasma Pistol)
*Whap*
2 damage!

--------------XCOM Turn--------------

HP: 6   AP: 11
General Van Doorn is in FULL cover.
[1]  (6 AP) (~3 dmg)(6AP) Fire Ballistic Rifle at (Sectoid) Guard Glurp Glopperson - 3 HP - (70%)
[2]  (6 AP) Overwatch
[3]  (8 AP) Reload
[4]  (3 AP) Reposition
[5]  (1 AP) Hunker down
[6] End turn
> 

Selecting grenades at drop point crashes

Dan French: "Reached an access point, Commander. Requesting additional goods!"
Dan French: "We only have a short time before the aliens close it off!"
Fragments: 280
Elerium: 271
Meld: 368
Alloy: 60
Time: 60
HP: 31  AP: 0   Ammo: 5
1: "(60 Time) (15m) Insta-Genemod: Depth Perception (+5 aim)"
2: "(60 Time) (15m) Micro-Augment: Reflex Servomotors (+2 AP)"
4: "(60 Time) (20m) Insta-Genemod: Muscle Regeneration (+10 HP)"
5: "(60 Time) (20m) Micro-Augment: Grenade Launcher (+2 Frag Grenades)"
6: "(40 Time) (20e) (40f) Get Laser Rifle"
     (~4dmg), infinite ammo
7: "(40 Time) (10e) (30f) Get Laser Carbine"
     (~3dmg), infinite ammo, +10% aim
8: "(30 Time) (10m) (5f) Get Nano Serum"
9: "(30 Time) (20f) (4a) Get Frag Grenade"
10: "(20 Time) (5m) Recuperate (+1 HP)"
11: "(20 Time) Reload Weapon"
12: "(60 Time) Advance (Skip this Drop Zone)"
> 5
selected option 5
Major '98' French is out of AP!
HP: 31  AP: 18  Ammo: 5
Major '98' French is in FULL cover.
Traceback (most recent call last):
  File "textcom.py", line 1839, in <module>
    playerTurn()
  File "textcom.py", line 1416, in playerTurn
    actions.append(FireAction(soldier, alien))
  File "textcom.py", line 1140, in __init__
    self.hit_chance = soldier.aim_at(target)
  File "textcom.py", line 728, in aim_at
    hit_chance = self.aim - target.cover
AttributeError: 'str' object has no attribute 'cover'

Did you mean for probability to be 4%?

this code

def drop():
    itemdrop = rd.randrange(0,5)
    if rd.randrange(1,100) < 5:

looks like it generates a number from 1 to 100, and then looks to see if it's 4 or less, resulting in a 4% drop rate instead of 5%

rd.randrange(0,99) < 5 would be 5%.
=)

Incorrect item costs at drop zone + stuck

Nano Serum is reported as (10m) (5f), but it only subtracted (5m) (5f).
Recuperate is reported as (5m), but subtracted nothing.

Carmen Clarke: "Reached an access point, Commander. Requesting additional goods!"
Carmen Clarke: "We only have a short time before the aliens close it off!"
Fragments: 38
Elerium: 19
Meld: 12
Alloy: 0
Time: 60
HP: 8   AP: 0   Ammo: 5
1: "(40 Time) (10e) (30f) Get Laser Carbine"
     (~3dmg), infinite ammo, +10% aim
2: "(30 Time) (10m) (5f) Get Nano Serum"
3: "(20 Time) (5m) Recuperate (+1 HP)"
4: "(20 Time) Reload Weapon"
5: "(60 Time) Advance (Skip this Drop Zone)"
> 2
selected option 2
Nano Serum fabricated!
Fragments: 33
Elerium: 19
Meld: 7
Alloy: 0
Time: 30
HP: 8   AP: 0   Ammo: 5
1: "(30 Time) (10m) (5f) Get Nano Serum"
2: "(20 Time) (5m) Recuperate (+1 HP)"
3: "(20 Time) Reload Weapon"
4: "(30 Time) Advance (Skip this Drop Zone)"
> 2
selected option 2
Healed 1HP!
Fragments: 33
Elerium: 19
Meld: 7
Alloy: 0
Time: 10
HP: 9   AP: 0   Ammo: 5
1: "(10 Time) Advance (Skip this Drop Zone)"

On another note: Now I'm stuck:

Fragments: 33
Elerium: 19
Meld: 7
Alloy: 0
Time: 10
HP: 9   AP: 0   Ammo: 5
1: "(10 Time) Advance (Skip this Drop Zone)"
> 1
That's not an option.
> 1
That's not an option.
> 2
That's not an option.
> 1
That's not an option.
> 0
That's not an option.

[Feature request] Show amount of ammo in gun

When you have enough AP to shoot, but are out of ammo, eventually you learn why you can't shoot, but it's still disconcerting.

Showing that you are out of ammo, or showing how much you have left after each action might be nice.

Overwatch still sticky

yet again, got hit by overwatch when after they had fired

--------------Alien Activity!--------------

(Muton) Officer Jeffery Jankins fires at Colonel 'Seismic' Fox (20%)(Plasma Rifle)
*Whap-whap-whap!*
 Missed!
(Floater) Warrior Algernon Peters uses Alien Grenade!
**BLAM!**
3 damage!

--------------XCOM Turn--------------

HP: 40  AP: 19  Ammo: 1
Colonel 'Seismic' Fox is in HALF cover.
[1]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Muton) Officer Jeffery Jankins - 13 HP - (75%)
[2]  (6 AP) (~4 dmg) Fire Light Plasma Rifle at (Floater) Warrior Algernon Peters - 5 HP - (75%)
[o]  (6 AP) Overwatch
[r]  (8 AP) Reload
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> 2
Megan Fox: "Welcome to Earth!"
*W-W-Whap!*
 Missed!
HP: 40  AP: 13  Ammo: 0
Colonel 'Seismic' Fox is in HALF cover.
[r]  (8 AP) Reload
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> 2
'2' is not a valid action
> r
HP: 40  AP: 5   Ammo: 4
Colonel 'Seismic' Fox is in HALF cover.
[p]  (3 AP) Reposition
[h]  (1 AP) Hunker down
[e] End turn
> p
(Muton) Officer Jeffery Jankins reacts!
*Whap-whap-whap!*
7 damage!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.