Little tweak of attack.pm for Homunculus leveling

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Message
Author
Myself379
Human
Human
Posts: 24
Joined: 05 Oct 2010, 09:46
Noob?: No

Little tweak of attack.pm for Homunculus leveling

#1 Post by Myself379 »

Problem
I'm using r8662

When a Alchemist/Biochemist want to level their own Homunculus at level 1. They would want their Homun to hit the target instead of the character.

By setting :

Code: Select all

attackUseWeapon 0
Kore will range attack will be very far. I checked the attack.pm, it was set to default of :

line 329 attack.pm

Code: Select all

$args->{attackMethod}{distance} = 30;
$args->{attackMethod}{maxDistance} = 30;
Suggestion

with addition of attackUseHomunOnly (Boolean of 1|0) in config.txt

change attack.pm it to :

Code: Select all

			if ($config{'attackUseHomunOnly'} {
				$args->{attackMethod}{distance} = 2;
				$args->{attackMethod}{maxDistance} = 2;
				undef $args->{attackMethod}{type};
			} else {
			$args->{attackMethod}{distance} = 30;
			$args->{attackMethod}{maxDistance} = 30;
			undef $args->{attackMethod}{type};
			}