# Eventually this file should include an easy test for every feature

defaults:

# Testing notes: remember to test with and without ancillary plugins (eg. worldguard, mobarena, moneydrop)

# test ANY_ITEM somewhere, test "tool: DIAMOND_SWORD@!DAMAGE_ALL" somewhere

otherdrops:
  GRASS:
    # Test block drop & message
    - tool: HANDS # tool ALL is the default but make sure it works if it's there too
      drop: DIAMOND_SWORD@!DAMAGE_ALL#5 # test item drop and enchantment drops
      message: "&Cstep 1a)&F %q enchanted diamond sword should have dropped, please wait a moment for a pig to drop." # test string out of list
    - tool: ALL
    # test messages & color
      message: ["Color test: §EYellow, &CRed, &fWhite"]
    
    - tool: HANDS
      drop: PIG
      delay: 40
      message: ["&Cstep 1b)&F A pig should have dropped, please kill it."]
      
  PIG@UNSADDLED:
    - message: "&Cstep 2a)&F Money test - balance will show, money drop and balance shown again."
      command: "/money"  # test money, balance below money drop

    - drop: MONEY  # do money drop
      quantity: 1-10
      delay: 10
      message: ["&Cstep 2b)&F You found $%q - balance should have increased by %q."]
      
    - delay: 20
      command: "/money"  # test money, balance after money drop (command for iConomy)
    
    - toolexcept: GOLD_SWORD
      drop: SHEEP
      delay: 60
      message: ["&Cstep 2c)&F Now please kill the sheep with the diamond sword."]

# test lower chance exclusive drop
    - tool: ALL
      drop: DIAMOND
      exclusive: 1
      chance: 10

    - command: "/!*time set 18000"
      delay: 40
      message: ["&Cstep 2d)&F Time should now be midnight - needed for next step."]
      
  
  CREATURE_SHEEP:
    - drop: [BLAZE_ROD, GOLD_HOE]
      time: night
      message: ["&Cstep 3)&F Night detected, here's a blaze-rod & gold_hoe, please right-click with the blaze-rod."]
    - time: DAY
      message: "&Cstep 3 failed! Oops - it's still day - perhaps 'command:' on the pig didn't work?"

  ANY_BLOCK:
    - action: RIGHT_CLICK
      tool: BLAZE_ROD
      command: "/!*time set 6000"
      time: night
      message: "&Cstep 3.5a)&F Time should now be day, break some leaves with the hoe (or left-click a block for night)"

    - action: LEFT_CLICK
      tool: BLAZE_ROD
      command: "/!*time set 18000"
      time: day
      message: "&Cstep 3.5b)&F Time should now be night, right click on a block to make it day and break leaves with the gold_hoe."

  LEAVES:

    - tool: ANY_HOE
      drop: GOLD_APPLE
# test permissions
      permissions: "leaves.apple"
      messages: "&Cstep 4x)&F Congrats - hoe on leaves worked with permission (otherdrops.custom.leaves.apple) successs"

# test permissionsexcept somehow
      #permissionsexcept: "leaves.egg"


  # test second drop with spade
    - tool: ANY_HOE
      drop: NOTHING
      message: "&Cstep 4a)&F Hoe detected - please wait a few seconds"

    - dropgroup: test
      tool: GOLD_HOE
      message: ["&Cstep 4b)&F Congrats, gold hoe detected, event test: you should see lightning with a short delay (60)."]
      drops:
# test event - lightning
        - events: LIGHTNING
          message: ["&Cstep 4c)&F Lightning triggered."]
          delay: 60


    - tool: ANY_HOE
      drop: NOTHING
      replacementblock: GLOWSTONE
      message: "&Cstep 4d)&F Replacing leaves with glowstone... break the glowstone."
      delay: 61


      
  GLOWSTONE:
    - drop: PIG@SADDLED
      message: "&Cstep 5)&F Saddled pig should drop, please kill it."
    
  PIG@SADDLED:
    - drop: BOAT
      message: "&Cstep 6)&F Boat should drop, please place on the ground and destroy it."
    
  BOAT:
    - drop: [MINECART, TRACKS]
      message: "&Cstep 7)&F Minecart (and tracks) should drop, please place the track, place the minecart on top and destroy it."

  MINECART:
    - drop: SNOWMAN
      message: "&Cstep 8)&F A snowman should drop, please left click it a few times (diamonds should drop) then rightclick (should turn to diamond ore)."
    

  SNOWMAN:
    - action: LEFT_CLICK
      drop: DIAMOND
    - action: RIGHT_CLICK
      drop: DIAMOND_PICKAXE
      replacementblock: DIAMOND_ORE
      message: "&Cstep 9)&F You should see diamond ore and a pickaxe - break the ore."

  DIAMOND_ORE:
    - drop: MONSTER_EGG@96  # spawns a mooshroom which (as at CB1772) is still detected as a cow upon death
      message: "&Cstep 10)&F You should see an egg (Minecraft 1.1 only), pick it up and rightclick (should get a Mooshroom)."


      
  # Test creature drop
  CREATURE_COW:
    - tool: ALL
      drop: LAVA_BUCKET
      message: "&CFinal step, failed?&F  If you just killed a mooshroom and see a lava bucket then OtherDrops still thinks you killed a normal cow..."

  MOOSHROOM:  # testing mooshroom alias for MUSHROOM_COW
    - tool: ALL
      drop: 116  # enchantment table
      message: "&CFinal step)&F Mooshroom killed - dropping enchantment table via ID value."

