Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
the_dungeon_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
ee2dbc00
Commit
ee2dbc00
authored
Jan 06, 2016
by
Mathieu Hilaire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trigger gold implemented
parent
e0e19cfe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
src/assets/GOLD.jpg
src/assets/GOLD.jpg
+0
-0
src/assets/species/species.txt
src/assets/species/species.txt
+4
-2
src/core/abilities/effects/EffectBuilder.java
src/core/abilities/effects/EffectBuilder.java
+7
-1
src/core/gamestate/Character.java
src/core/gamestate/Character.java
+2
-2
No files found.
src/assets/GOLD.jpg
0 → 100644
View file @
ee2dbc00
237 KB
src/assets/species/species.txt
View file @
ee2dbc00
...
...
@@ -333,7 +333,9 @@ FIREBOLT
DEFAULT_TRIGGER
#effect descriptor
1
TR
AP_TRIGGER
TR
IGGER_GOLD
#abilityList
0
1
TEST_SUICIDE
src/core/abilities/effects/EffectBuilder.java
View file @
ee2dbc00
...
...
@@ -269,6 +269,12 @@ public class EffectBuilder implements Serializable{
}
};
}
/**
* A trigger increasing the amount of gold of the characters in the area. if it happens then send a destroy event
* to the entity responsable.
* @return An instance of Effect doing what is described above.
*/
Effect
trigger_gold
()
{
return
new
Effect
()
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -279,7 +285,7 @@ public class EffectBuilder implements Serializable{
for
(
Integer
targetID
:
targetCharacterIDList
)
{
try
{
if
(
gameContent
.
getGameState
().
getEntity
(
casterCharacterID
).
getOwned_character
()
!=
targetID
)
{
gameContent
.
getGameState
().
getCharacter
(
targetID
).
takeDamage
(
Math
.
max
(
1
,
0
)
);
gameContent
.
getGameState
().
getCharacter
(
targetID
).
setGold
(
gameContent
.
getGameState
().
getCharacter
(
targetID
).
getGold
()
+
1
);
hit
=
true
;
}
}
catch
(
EntityNotFoundExeption
entityNotFoundExeption
)
{
...
...
src/core/gamestate/Character.java
View file @
ee2dbc00
...
...
@@ -94,8 +94,8 @@ public final class Character extends Being {
}
/**
*
Returns
the character's gold value.
* @
return
the character's gold value.
*
Set
the character's gold value.
* @
set
the character's gold value.
*/
public
void
setGold
(
int
gold2
)
{
this
.
gold
=
gold2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment