Commit Graph

145 Commits

Author SHA1 Message Date
pavanvo 339ff320cb
fix: check if unit have too match commands 2022-08-28 16:21:45 +04:00
pavanvo 5523bba192 refactor: command sorting code 2022-08-14 13:38:16 +02:00
pavanvo f2b8d76383 fix: if two build buttons, move second to basics 2022-08-14 13:38:16 +02:00
pavanvo f1e4a1bf83 feat: standart for cammand grid 2022-08-14 13:38:15 +02:00
Rampoina 22a474b93b
Allow a selected group to have the attack command even if some units … (#217)
* Allow a selected group to have the attack command even if some units don't have it

* Add getUnitFromCC function

* return NULL if getFirstCtOfClass founds no unit

* Search for the unit containing the attack command in a non uniform selection

Co-authored-by: Rampoina <Rampoina@protonmail.com>
2022-08-08 23:26:47 +01:00
titiger 75651f3b2e Fix for maxHP upgrades
Fixed the calculation of HP if value is given in percent.
2021-01-02 20:27:51 +01:00
SoftCoder 865a665bf0 - round 2 of cppcheck code cleanup 2017-10-09 20:21:14 -07:00
titiger cd8530f69e new tag <ai-build-size> 2016-12-10 16:01:26 +01:00
titiger f8d57bece3 Error handling 2016-11-28 02:36:55 +01:00
titison 74ed3d73be Uniformselection
Added uniform selection of units.
Uniform means you can select multiple units, but only of the same type.
To make a unit uniform-selectable you need to add
```<uniform-selection value="true"/>```
to the ```<parameters>``` tag of a unit.
2016-08-24 00:53:56 +02:00
SoftCoder 0d8377d6b4 - try to fix mac build 2016-01-18 15:29:16 -08:00
SoftCoder 86a59859b9 - atempt to cleanup use fo auto_ptr 2016-01-18 13:20:49 -08:00
SoftCoder dc143f8819 - few more tiny fixes for msvc compiler warnings 2014-12-21 23:45:16 -08:00
SoftCoder ceca2fc5aa - more fixes from cppcheck 2014-11-28 18:19:40 -08:00
SoftCoder a656a64830 - corrected some uninitialized vars identified by cppcheck 2014-11-28 16:53:30 -08:00
titiger 024338429a special height for fire and hitposition can be set in a units 2014-11-25 22:36:19 +01:00
titison 345c88d320 Work on Healthbars
production bars;
options;
many more...;
2014-11-22 23:15:19 +01:00
titison 791e1edec6 Healthbars
Textures (border and background)
Faction.xml can specify more healthbars details
2014-11-05 02:05:47 +01:00
titison 08806c5416 *Finised Hp Bars
*Added general settings in faction.xml
2014-10-29 22:23:46 +01:00
titison de5135bfaf *added split(s,d) function for strings
*reading unit xml healthbar node
*adjusted hpbars
2014-10-29 00:50:45 +01:00
titiger feb31e27d9 tags feature
Tags feature ( manually merged ) from Omegas pullrequest 25
https://github.com/MegaGlest/megaglest-source/pull/25/
see forum discussion:
https://forum.megaglest.org/index.php?topic=9543.0
2014-09-29 02:23:36 +02:00
titison 850a9a7dc0 -AI can't command non-commandable units anymore
-Removed non-selectable
2014-08-07 21:00:27 +02:00
titison 72828c39a3 Added to booleans
1. selectable	| if this is false, you cant select the unit.
2. commandable	| if this is false, you cant give the units commands.

I advise to set a non-selectable unit to non-commandable too if you want to make a normal unit morph into it.
2014-07-28 17:03:36 +02:00
titiger a51ae28018 windows does not know uint out of the box 2014-07-23 02:33:10 +02:00
titiger 082f3472ee Looting 2014-07-22 23:53:45 +02:00
Mike Hoffert fbde1e69a3 Fixed bad names 2014-07-22 15:23:05 -06:00
Mike Hoffert 86954aed47 Renamed loss-percentage to faction-loss-percentage
Also renamed loss-value accordingly. As discussed with Titi in IRC.
2014-07-22 14:58:41 -06:00
Mike Hoffert f0801b3c33 Converted floats to ints
As discussed with Titi, this may prevent some issues with multiplayer
getting out of sync due to different floating point calculations.
2014-07-19 19:03:33 -06:00
Mike Hoffert 9883bf7656 Merge branch 'feature-starting-vals' into feature-looting 2014-07-19 19:00:08 -06:00
Mike Hoffert ef0cf706b3 Converted percentages to use int instead of float
May help prevent floating point calculation errors in multiplayer.
2014-07-19 18:59:11 -06:00
Mike Hoffert 75eb5c8ddf Lootable resources now checks for dups 2014-07-19 16:52:53 -06:00
Mike Hoffert 68455a819f Added setting to disable going into negatives
After all, how does one loot what the other faction does not have? Still,
could be useful for some places, by forcing the opponent to go into
"debt".
2014-07-19 16:38:33 -06:00
Mike Hoffert df0d7aaac9 Implemented rest of resource amount/loss attrs 2014-07-19 16:13:09 -06:00
Mike Hoffert 23deb957a7 First, basic looting implementation
Only absolute values are obtained for now, no loss.
2014-07-19 15:37:59 -06:00
Mike Hoffert 0a68e3a6a4 Implemented starting value for HP
Same syntax as for EP:

    <max-hp value="1000" regeneration="1" start-percentage="1.0" />

Where `start-percentage` can be replaced by `start-value` to use an
absolute number. Note that unlike EP, HP defaults to the max-hp value
*before* upgrades are applied. This behavior is not changed. To make units
spawn with their fully upgraded HP, set their start-percentage to 1.0.
2014-07-19 10:57:34 -06:00
Mike Hoffert 94667b9ab9 Error checking now active for start-ep
You can no longer have both start-value and start-percentage.
2014-07-19 10:31:57 -06:00
Mike Hoffert a65898571d Implemented start percentage for EP
Note that start-value and start-percentage (both are attributes of the
max-ep tag) are mutually exclusive. If they both exist, then
start-percentage is used.
2014-07-19 09:53:38 -06:00
Mike Hoffert f22c96e503 Start ep now an argument of max-ep
Syntax is `<max-ep value="500" start-value="250" />`
2014-07-19 09:15:53 -06:00
FreshDumbledore 202fcd7cad fixed an unimported copy&paste tag :) had no influence afaik but still
better like this
2014-06-18 22:50:07 +02:00
FreshDumbledore 04d2664b06 optional start-ep tag implemented 2014-06-18 22:00:50 +02:00
SoftCoder b0fc9597e3 - fixed some bugs reported by coverity 2014-01-17 09:53:19 -08:00
titiger 11eeed59a1 new attribute "render-size" in unit-type 2013-12-30 16:19:08 +01:00
SoftCoder b9d6b38e8f - coverity based bug fixes - round #1 2013-12-13 23:04:12 -08:00
Mark Vejvoda 9268aaf279 - a few minor bug fixes related to code warnings
- code cleanup based on additional gcc warnings
- enabled additional gcc compiler warnings
2013-11-19 06:14:06 +00:00
Mark Vejvoda 5ab99d2469 cppcheck cleanup 2013-11-05 20:59:28 +00:00
Mark Vejvoda 1134ad399d - added a more graceful way to handle more serious errors during data validation commands in order to offer more detailed error analysis 2013-11-04 07:21:04 +00:00
Mark Vejvoda 1d3859ff32 - windows x64 updates to get things compiling on vc2012 x64 2013-11-02 11:04:52 +00:00
Mark Vejvoda d2ba7b163b a little refactoring of function names in language class 2013-10-29 06:13:38 +00:00
Mark Vejvoda dc503d6340 - attempt to see if this makes stability better 2013-10-02 20:22:10 +00:00
Mark Vejvoda de8b083329 - attempt to fix additional oos issues 2013-09-30 17:38:26 +00:00