-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Hyperion with ShadowWarp. And some interfaces.
- Loading branch information
1 parent
0b2cb03
commit 00cfdc9
Showing
7 changed files
with
103 additions
and
9 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
8 changes: 8 additions & 0 deletions
8
...main/java/com/sweattypalms/skyblock/core/items/builder/abilities/ModifiableAbilities.java
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,8 @@ | ||
package com.sweattypalms.skyblock.core.items.builder.abilities; | ||
|
||
import java.util.List; | ||
|
||
public interface ModifiableAbilities { | ||
List<Ability> getPossibleAbilities(); | ||
void addAbility(Ability ability); | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/sweattypalms/skyblock/core/items/builder/dungeon/Dungeonizeable.kt
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,6 @@ | ||
package com.sweattypalms.skyblock.core.items.builder.dungeon | ||
|
||
interface Dungeonizeable { | ||
fun canBeStarred(): Boolean | ||
fun canBeMasterStarred(): Boolean | ||
} |
66 changes: 66 additions & 0 deletions
66
src/main/java/com/sweattypalms/skyblock/core/items/types/dungeon/Hyperion.kt
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,66 @@ | ||
package com.sweattypalms.skyblock.core.items.types.dungeon | ||
|
||
import com.sweattypalms.skyblock.core.events.def.SkyblockInteractEvent | ||
import com.sweattypalms.skyblock.core.items.builder.Rarity | ||
import com.sweattypalms.skyblock.core.items.builder.SkyblockItem | ||
import com.sweattypalms.skyblock.core.items.builder.SkyblockItemType | ||
import com.sweattypalms.skyblock.core.items.builder.abilities.Ability | ||
import com.sweattypalms.skyblock.core.items.builder.abilities.AbilityManager.TELEPORT_ABILITY | ||
import com.sweattypalms.skyblock.core.items.builder.abilities.IHasAbility | ||
import com.sweattypalms.skyblock.core.items.builder.abilities.types.ICooldown | ||
import com.sweattypalms.skyblock.core.items.builder.abilities.types.ITriggerableAbility | ||
import com.sweattypalms.skyblock.core.items.builder.abilities.types.IUsageCost | ||
import com.sweattypalms.skyblock.core.player.SkyblockPlayer | ||
import com.sweattypalms.skyblock.core.player.sub.stats.Stats | ||
import org.bukkit.Material | ||
import org.bukkit.event.Event | ||
|
||
const val ID = "hyperion" | ||
val STATS = mapOf( | ||
Stats.DAMAGE to 260.0, | ||
Stats.STRENGTH to 150.0 | ||
) | ||
|
||
class Hyperion : SkyblockItem( | ||
ID, | ||
"Hyperion", | ||
Material.IRON_SWORD, | ||
null, | ||
STATS, | ||
Rarity.LEGENDARY, | ||
SkyblockItemType.SWORD | ||
), IHasAbility { | ||
|
||
class ShadowWarp : TELEPORT_ABILITY(10), ICooldown { | ||
override fun getName(): String { | ||
return "Shadow Warp" | ||
} | ||
|
||
override fun getDescription(): MutableList<String> { | ||
return mutableListOf( | ||
"$7Creates a space distortion \$e10", | ||
"$7blocks ahead of you that sucks all", | ||
"$7enemies around it. Use this ability", | ||
"$7again within \$e5$7 seconds to detonate", | ||
"$7the warp and deal damage to enemies", | ||
"$7near it." | ||
) | ||
} | ||
|
||
override fun apply(event: Event) { | ||
if (event !is SkyblockInteractEvent) return | ||
if (super.isOnCooldown(event.skyblockPlayer)) return | ||
|
||
super<ICooldown>.apply(event) | ||
super<TELEPORT_ABILITY>.apply(event) | ||
} | ||
|
||
override fun getCooldown(skyblockPlayer: SkyblockPlayer?): Long = 10_000 | ||
|
||
override fun getCost(): MutableMap<Stats, Double> = mutableMapOf( | ||
Stats.INTELLIGENCE to 300.0 | ||
) | ||
} | ||
|
||
override fun getAbilities(): MutableList<Ability> = mutableListOf(ShadowWarp()) | ||
} |
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 |
---|---|---|
@@ -1,8 +1,15 @@ | ||
package com.sweattypalms.skyblock.kotlin | ||
|
||
import com.sweattypalms.skyblock.core.player.SkyblockPlayer | ||
import org.bukkit.Bukkit | ||
import org.bukkit.entity.Player | ||
import java.util.UUID | ||
|
||
public fun Player.getSkyblockPlayer(): SkyblockPlayer { | ||
return SkyblockPlayer.getSkyblockPlayer(this) | ||
} | ||
|
||
fun something(uuid: UUID) { | ||
val bukkitPlayer = Bukkit.getPlayer(uuid) | ||
bukkitPlayer?.getSkyblockPlayer() | ||
} |