Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: self.gard is not a function' in or related to this line: 'self.gard(true);' Line Number: 360
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: self.gard is not a function' in or related to this line: 'self.gard(true);' Line Number: 352
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: target is undefined' in or related to this line: 'self.targetX = target.x;' Line Number: 370
User prompt
in thinkAboutTarget, when self.energy < 15, select a corner far from the other player
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: opponent.isPunching is not a function' in or related to this line: 'if (opponent.isPunching(opponent.leftHand.intersects(player.torso) || opponent.rightHand.intersects(player.torso))) {' Line Number: 860
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
in handleHit, fix the scope problem for members in the settimeout
Code edit (1 edits merged)
Please save this source code
User prompt
in handleHit, also use members array for the restoration of the positions
User prompt
in handleHit, move the members back in the setTimout function
User prompt
in handleHit, use members array to determine which members to move back and forth
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: guardLevel is not defined' in or related to this line: 'if (guardLevel > 25) {' Line Number: 360
Code edit (1 edits merged)
Please save this source code
Code edit (14 edits merged)
Please save this source code
User prompt
add the opponent health bar at the top of the screen
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
in handleHitImpact when KO call game over
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -330,9 +330,8 @@
if (!self.isPlayer) {
self.guard(true);
}
}
- self.guard(true);
if (!self.isPlayer) {
log("AI RETREAT !!!");
}
if (other.x > 1024) {
@@ -468,9 +467,9 @@
});
/****************************************************************************************** */
/************************************* ENERGY BAR CLASS ********************************** */
/****************************************************************************************** */
-var EnergyBar = Container.expand(function (maxEnergy, isGard) {
+var EnergyBar = Container.expand(function (maxEnergy, isGuard) {
var self = Container.call(this);
self.maxEnergy = maxEnergy;
self.currentEnergy = maxEnergy;
// Background of the energy bar
@@ -492,9 +491,9 @@
height: 0,
visible: true
});
// Lightning icon above the energy bar
- self.lightningIcon = self.attachAsset(isGard ? 'shieldIcon' : 'lightning', {
+ self.lightningIcon = self.attachAsset(isGuard ? 'shieldIcon' : 'lightning', {
anchorX: 0.5,
anchorY: 1,
x: 0,
y: -self.energyGradiant.height / 2 - 50 // Position above the energy bar
clear
basic light gray convex round button with a red boxing glove icon. UI
Un gant de boxe bleu vu de dessus. video game
basic light round convex gray button with a raised blue shield icon.. UI
un éclair. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
remove
a basic white heart.. game icon
A boxer has lost the match..
man boxer with red gloves is KO on the ring..