Skip to content

Commit

Permalink
added fireworm,wizard and icequeen animation and Junit_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jigyasu committed Oct 16, 2023
2 parents 3d08ddf + d540a08 commit 8f7524c
Show file tree
Hide file tree
Showing 47 changed files with 483 additions and 147 deletions.
2 changes: 1 addition & 1 deletion source/core/assets/configs/player.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"health": 100,
"baseAttack": 10,
"gold": 50,
"gold": 500,
"favouriteColour": "peach"
}
2 changes: 1 addition & 1 deletion source/core/assets/configs/tower.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"stunTower": {
"health": 10,
"baseAttack": 10,
"cost": 10
"cost": 1
}
}
7 changes: 7 additions & 0 deletions source/core/assets/images/mobs/dragon_knight.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ dragon_knight_attack
orig: 99, 99
offset: 0, 0
index: -1
dragon_knight_freeze
rotate: false
xy: 407, 2
size: 99, 99
orig: 99, 99
offset: 0, 0
index: -1
dragon_knight_attack
rotate: false
xy: 2, 308
Expand Down
Binary file modified source/core/assets/images/mobs/dragon_knight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/core/assets/images/mobs/fire_worm.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ fire_worm_death
orig: 75, 75
offset: 0, 0
index: -1
fire_worm_freeze
rotate: false
xy: 770, 2
size: 75, 75
orig: 75, 75
offset: 0, 0
index: -1
fire_worm_death
rotate: false
xy: 2, 156
Expand Down
Binary file modified source/core/assets/images/mobs/fire_worm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/core/assets/images/mobs/robot.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ Walk
orig: 32, 72
offset: 46, -56
index: -1
Freeze
rotate: false
xy: 925, 34
size: 32, 72
orig: 32, 72
offset: 46, -56
index: -1
Walk
rotate: false
xy: 483, 34
Expand Down
Binary file modified source/core/assets/images/mobs/robot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/core/assets/images/mobs/skeleton.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ skeleton_attack
orig: 62, 48
offset: 0, 0
index: -1
skeleton_freeze
rotate: false
xy: 1152, 2
size: 62, 48
orig: 62, 48
offset: 0, 0
index: -1
skeleton_attack
rotate: false
xy: 642, 2
Expand Down
Binary file modified source/core/assets/images/mobs/skeleton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/core/assets/images/mobs/water_queen.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ water_queen_walk
orig: 90, 60
offset: 0, 0
index: -1
water_queen_freeze
rotate: false
xy: 1104, 2
size: 90, 60
orig: 90, 60
offset: 0, 0
index: -1
water_queen_walk
rotate: false
xy: 554, 2
Expand Down
Binary file modified source/core/assets/images/mobs/water_queen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/core/assets/images/mobs/water_slime.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ water_slime_death
orig: 32, 25
offset: 0, 0
index: -1
water_slime_freeze
rotate: false
xy: 442, 2
size: 32, 25
orig: 32, 25
offset: 0, 0
index: -1
water_slime_death
rotate: false
xy: 240, 2
Expand Down
Binary file modified source/core/assets/images/mobs/water_slime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/core/assets/images/mobs/wizard.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ wizard_death
orig: 110, 90
offset: 0, 0
index: -1
wizard_freeze
rotate: false
xy: 1250, 94
size: 110, 90
orig: 110, 90
offset: 0, 0
index: -1
wizard_death
rotate: false
xy: 804, 2
Expand Down
Binary file modified source/core/assets/images/mobs/wizard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/core/assets/images/mobs/xeno-Grunt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions source/core/assets/images/mobs/xenoGrunt.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ xeno_run
orig: 200, 200
offset: 0, 0
index: 7
xeno_freeze
rotate: false
xy: 1600, 0
size: 200, 200
orig: 200, 200
offset: 0, 0
index: -1
xeno_hurt
rotate: false
xy: 0, 200
Expand Down
38 changes: 26 additions & 12 deletions source/core/assets/images/projectiles/basic_projectile.atlas
Original file line number Diff line number Diff line change
@@ -1,41 +1,55 @@

basic_projectile.png
size: 256, 32
size: 260, 32
format: RGBA8888
filter: Nearest, Nearest
repeat: none
projectile
rotate: false
xy: 78, 2
size: 36, 19
orig: 36, 19
offset: 0, 0
index: -1
projectileFinal
rotate: false
xy: 2, 2
size: 36, 19
orig: 36, 19
offset: 0, 0
index: 2
index: -1
projectile
rotate: false
xy: 40, 2
xy: 116, 2
size: 36, 19
orig: 36, 19
offset: 0, 0
index: 4
index: -1
projectile
rotate: false
xy: 78, 2
xy: 40, 2
size: 36, 19
orig: 36, 19
offset: 0, 0
index: 1
projectile
index: -1
projectileCollide
rotate: false
xy: 116, 2
xy: 152, 2
size: 36, 19
orig: 36, 19
offset: 0, 0
index: 3
default
index: -1
projectileCollide
rotate: false
xy: 116, 2
xy: 188, 2
size: 36, 19
orig: 36, 19
offset: 0, 0
index: -1
projectileCollide
rotate: false
xy: 224, 2
size: 36, 19
orig: 36, 19
offset: 0, 0
index: 3
index: -1
Binary file modified source/core/assets/images/projectiles/basic_projectile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions source/core/assets/images/projectiles/desktop.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ViewState]
Mode=
Vid=
FolderType=Generic
24 changes: 22 additions & 2 deletions source/core/assets/images/projectiles/engineer_projectile.atlas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

engineer_projectile.png
size: 128, 32
size: 148, 32
format: RGBA8888
filter: Nearest, Nearest
repeat: none
Expand Down Expand Up @@ -32,4 +32,24 @@ bullet
orig: 20, 19
offset: 0, 0
index: -1

bulletCollide
rotate: false
xy: 87, 2
size: 20, 19
orig: 20, 19
offset: 0, 0
index: -1
bulletCollide
rotate: false
xy: 107, 2
size: 20, 19
orig: 20, 19
offset: 0, 0
index: -1
bulletCollide
rotate: false
xy: 127, 2
size: 20, 19
orig: 20, 19
offset: 0, 0
index: -1
Binary file modified source/core/assets/images/projectiles/engineer_projectile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 22 additions & 1 deletion source/core/assets/images/projectiles/stun_effect.atlas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

stun_effect.png
size: 128, 32
size: 152, 32
format: RGBA8888
filter: Nearest, Nearest
repeat: none
Expand Down Expand Up @@ -32,6 +32,27 @@ projectile
orig: 17, 19
offset: 0, 0
index: -1
stun
rotate: false
xy: 87, 2
size: 21, 19
orig: 21, 19
offset: 0, 0
index: -1
stun
rotate: false
xy: 109, 2
size: 21, 19
orig: 21, 19
offset: 0, 0
index: -1
stun
rotate: false
xy: 131, 2
size: 21, 19
orig: 21, 19
offset: 0, 0
index: -1
default
rotate: false
xy: 2, 2
Expand Down
Binary file modified source/core/assets/images/projectiles/stun_effect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class AITaskComponent extends Component implements TaskRunner {
private final List<PriorityTask> priorityTasks = new ArrayList<>(2);
private final List<PriorityTask> priorityTasksToBeRestored = new ArrayList<>(2);
private PriorityTask currentTask;

public boolean freezed = false;
/**
* Add a priority task to the list of tasks. This task will be run only when it has the highest
* priority, and can be stopped to run a higher priority task.
Expand Down Expand Up @@ -65,10 +67,11 @@ public void update() {
return;
}

if (desiredtask != currentTask) {
if (desiredtask != currentTask && !freezed) {
changeTask(desiredtask);
}
currentTask.update();
if(currentTask!=null)
currentTask.update();
}

@Override
Expand Down
Loading

0 comments on commit 8f7524c

Please sign in to comment.