-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
신규 능력: 고슴도치 신규 능력: 영혼수확자 아이템 드롭 콘피그 제거 PushingArray -> PushingList로 변경, 코드 정리 Locations, Vectors를 각각 LocationUtil, VectorUtil의 내부 클래스로 변경 FastMath에서 오류가 발생하던걸 막음
- Loading branch information
1 parent
88b7638
commit deffd9e
Showing
29 changed files
with
567 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package daybreak.abilitywar.ability.list; | ||
|
||
import daybreak.abilitywar.ability.AbilityBase; | ||
import daybreak.abilitywar.ability.AbilityManifest; | ||
import daybreak.abilitywar.ability.AbilityManifest.Rank; | ||
import daybreak.abilitywar.ability.AbilityManifest.Species; | ||
import daybreak.abilitywar.ability.SubscribeEvent; | ||
import daybreak.abilitywar.ability.event.AbilityRestrictionClearEvent; | ||
import daybreak.abilitywar.config.AbilitySettings.SettingObject; | ||
import daybreak.abilitywar.game.games.mode.AbstractGame.Participant; | ||
import daybreak.abilitywar.utils.math.LocationUtil; | ||
import org.bukkit.ChatColor; | ||
import org.bukkit.Material; | ||
import org.bukkit.entity.Damageable; | ||
import org.bukkit.entity.LivingEntity; | ||
|
||
@AbilityManifest(Name = "고슴도치", Rank = Rank.C, Species = Species.ANIMAL) | ||
public class Hedgehog extends AbilityBase { | ||
|
||
public static final SettingObject<Double> DamageConfig = new SettingObject<Double>(Hedgehog.class, "Damage", 2.0, | ||
"# 데미지") { | ||
|
||
@Override | ||
public boolean Condition(Double value) { | ||
return value >= 0; | ||
} | ||
|
||
}; | ||
|
||
public Hedgehog(Participant participant) { | ||
super(participant, | ||
ChatColor.translateAlternateColorCodes('&', "&f가시로 가까이에 있는 모든 생명체를 찌릅니다."), | ||
ChatColor.translateAlternateColorCodes('&', "&f아야! 그것 참 아프겠네요.")); | ||
} | ||
|
||
@Override | ||
public boolean ActiveSkill(Material materialType, ClickType ct) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void TargetSkill(Material materialType, LivingEntity entity) { | ||
} | ||
|
||
private final double damage = DamageConfig.getValue(); | ||
|
||
private final Timer passive = new Timer() { | ||
@Override | ||
protected void onProcess(int count) { | ||
for (Damageable damageable : LocationUtil.getNearbyDamageableEntities(getPlayer(), 1.5, 1.5)) { | ||
damageable.damage(damage, getPlayer()); | ||
} | ||
} | ||
}.setPeriod(10); | ||
|
||
@SubscribeEvent(onlyRelevant = true) | ||
private void onRestrictionClear(AbilityRestrictionClearEvent e) { | ||
passive.startTimer(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.