User:Soniccuz: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Soniccuz m →Local server:: formatting. |
imported>Soniccuz →Local server:: Self Reminder |
||
| Line 128: | Line 128: | ||
==Local server:== |
==Local server:== |
||
<pre style="white-space: pre; |
|||
white-space: -moz-pre; |
|||
white-space: -pre; |
|||
white-space: -o-pre;"> |
|||
/** |
|||
* moves to the given entity. When the distance to the destination is |
|||
* between <code>min</code> and <code>max</code> and this entity does |
|||
* not have a path already one is searched and saved. |
|||
* <p> |
|||
* <b>Note:</b> When the distance to the destination is less than |
|||
* <code>min</code> the path is removed. <b>Warning:</b> The pathfinder |
|||
* is not asynchronous, so this thread is blocked until a path is found. |
|||
* |
|||
* @param destEntity |
|||
* the destination entity |
|||
* @param min |
|||
* minimum distance to the destination entity |
|||
* @param max |
|||
* maximum distance to the destination entity |
|||
* @param maxPathRadius |
|||
* the maximum radius in which a path is searched |
|||
*/ |
|||
public void setMovement(final Entity destEntity, final double min, final double max, |
|||
final double maxPathRadius) { |
|||
if (nextTo(destEntity, min)) { |
|||
stop(); |
|||
Self Reminder. |
|||
if (hasPath()) { |
|||
logger.debug("Removing path because nextto(" |
|||
Logic for '''"umbrella weapon"''' that has a use command to toggle the '''"umbrella outfit"''' mostly done. Just needs it's own sprite and logic that turns the layer off automatically when player goes to unequip. |
|||
+ destEntity.getX() + "," + destEntity.getY() + "," |
|||
+ min + ") of (" + getX() + "," + getY() + ")"); |
|||
Also thinking of toying with different '''playable: races orc, elf, dwarf''' and of course human. Mostly want to see if I can get mobs to ignore me if I'm of the same species as them. Setup race in RPEntity, and add check to creature attack behavior. Not fully committed to this idea just want to challenge myself. |
|||
clearPath(); |
|||
} |
|||
There was something else... but I forgot what it was. |
|||
} else if ((squaredDistance(destEntity) > max)) { |
|||
logger.debug("Creating path because (" + getX() + "," + getY() |
|||
Oh! '''Angel Cane,''' item idea. Ranged healing staff target another player and '''click to use.''' Make sure to implement reasonable cool down. Maybe look into ranged_atk stat Deluge was working on... |
|||
+ ") distance(" + destEntity.getX() + "," |
|||
+ destEntity.getY() + ")>" + max); |
|||
final List<Node> path = Path.searchPath(this, destEntity, maxPathRadius); |
|||
setPath(new FixedPath(path, false)); |
|||
} |
|||
} |
|||
</pre> |
|||
<gallery> |
<gallery> |
||