:devin_first_date
  switch isPlayingDate ON

  displayItemId none
  start cutscene no villagers no creatures
  create villager Devin 70,72,4
  speed Devin 3
  speed Player 3
  move villager Devin 43,72,4
  move villager Player 43,73,4

  include load_player_dating_animations

  wait 150
  fade out
  wait 10
  remove villager Devin

  # Part 2
  teleport to mountain without saving 19,33,6
  wait 1
  start cutscene no villagers no creatures
  create villager Devin 18,33,6
  play child add_seasonal_item_to_player
  play child add_seasonal_item_to_devin
  speed Devin 3
  move villager Player 29,33,6
  move villager Devin 29,33,6
  fade in
  wait 120
  fade out
  wait 10
  remove villager Devin

  # Part 3
  teleport to mountain without saving 56,61,8
  wait 1
  start cutscene no villagers no creatures
  create villager Devin 57,63,8

  offset Devin Y -6
  offset Devin X -10

  if-variable month is 1
    displayItemId peach
    create item mango 58,57
  else
    if-variable month is 2
      displayItemId banana
      create item passion-fruit 58,57
    else
      if-variable month is 3
        displayItemId grape
        create item golden-honeydew 58,57
      else
        displayItemId starfruit
        create item persimmon 58,57
      end
    end
  end

  speed Devin 3
  move villager Player 56,59,8
  move villager Devin 57,61,8
  fade in
  wait for Player
  wait 20

  displayItemId none
  play sound DropItem

  if-variable month is 1
    create item peach 56,57
  else
    if-variable month is 2
      create item banana 56,57
    else
      if-variable month is 3
        create item grape 56,57
      else
        create item starfruit 56,57
      end
    end
  end

  wait for Devin  
  Devin "I have one more thing to add to the table."
  move villager Player 56,59,2
  wait 10
  Player "Did you make anything special?"
  wait 30

  move villager Devin 57,59,4
  wait for Devin
  turn Player right
  wait 10

  play sound PickItem
  if-switch playerChoseSavory
    villager_item_display Devin sandwich
    wait 30
    Player "A sandwich! And just like the one you gave me other day."
  else
    villager_item_display Devin chocolate-icecream
    wait 30
    Player "Some ice cream! And just like the one you gave me other day."
  end

  Devin "Yup! I remember you liked it back then, so I made another for you."
  move villager Devin 57,59,8
  wait 10
  villager_item_display Devin none
  play sound DropItem

  if-switch playerChoseSavory
    create item sandwich 57,57
  else
    create item chocolate-icecream 57,57
  end

  wait 10
  Player "So it really wasn't a publicity stunt that day, huh?"
  wait 10
  turn Devin left
  wait 10
  Devin "I tried to tell you, I was just doing something nice."
  Devin "I know everyone thinks I'm too lazy to do anything, but I like being nice to people."
  Devin "If I keep doing that, I won't lose my friends again."
  
  Player "What?<wait> What do you mean by that?"
  Devin "<!>"
  Devin "I think I've said too much!"
  Player "Don't worry...<wait>"
  Player "Do you want to talk about it?"
  Devin "I don't know...<wait>"
  move villager Devin 58,59,6
  wait for Devin
  Devin "<...>"
  wait 10
  turn Devin left
  js Managers.Villagers.getVillagerData('Devin')._x -= 0.32;
  wait for Devin
  Devin "Do you know those scars I have on my face?"
  Devin "I got them in a car accident when I was a kid. I spent the whole summer in the hospital after that."
  Devin "When I finally got back to school, nobody cared about me anymore."
  Devin "All the other kids had their own group of friends and I never managed to fit back in with them."
  Devin "This probably sounds super silly... But I think it messed with me a little."
  Devin "Dad moved me to a different school later. Ever since then, I've always tried my best to keep all my friendships."
  
  Player "That's not silly, Devin..."
  Player "But you also don't need to worry about losing your friends like that."
  Player "You're not a kid in school anymore. Now you get a chance to befriend people that like you for who you are."
  Player "And you're a cool and funny guy. You don't need to spoil people to keep them interested in you."

  Devin "I know that. It's just..."
  Devin "It's hard."
  
  move villager Player 57,59,6
  wait for Player

  # HUG

  js $gamePlayer._characterName = Managers.Player.generatePlayerSpriteName() + '_dating_poses';
  + $gamePlayer._lockPattern = true;
  + $gamePlayer._direction = 2;
  + $gamePlayer._characterIndex = 0;
  + $gamePlayer._pattern = 0;
  + this.tempEvent = $gameMap.createPlayerImpersonatorEvent($gamePlayer._characterName, $gamePlayer._characterIndex, Direction.LEFT, false, false, 0, true);
  + this.tempEvent._priorityType = 2;
  + this.tempEvent._zVariation = 2;

  wait 12
  js $gamePlayer._pattern = 1; this.tempEvent._pattern = 1;
  wait 12
  js $gamePlayer._pattern = 2; this.tempEvent._pattern = 2;


  js const npc = Managers.Villagers.getVillagerData('Devin');
  + npc._characterIndex = 6;
  + npc._pattern = 0;
  + npc._lockPattern = true;

  wait 12

  js Managers.Villagers.getVillagerData('Devin')._pattern = 1;
  wait 12
  js Managers.Villagers.getVillagerData('Devin')._pattern = 2;

  wait 60
  fade out
  wait 10

  js this.tempEvent.erase();
  + delete this.tempEvent;
  + $gamePlayer._lockPattern = false;

  displayItemId undefined
  teleport to home without saving 15,10,8
  switch isPlayingDate OFF
  speed Player restore
  switch playedDevinFirstDate ON
  wait 1
  fade in
  increase friendship Devin x 300

:add_seasonal_item_to_devin
  if-variable month is 1
    villager_item_display Devin mango
    return
  end
  
  if-variable month is 2
    villager_item_display Devin passion-fruit
    return
  end

  if-variable month is 3
    villager_item_display Devin golden-honeydew
    return
  end

  villager_item_display Devin persimmon

