Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Ruby by Anonymous ( 16 years ago )
#!/usr/bin/irb -r 

require 'rubygems'
require 'set'
require 'facets'
require 'mathn'


def help
  puts <<MSG
Quick start:

x = introduce(names.random_boy_name, :m)
y = introduce(names.random_girl_name, :f)
g(x, y).are_chatting
# If they liked together, you may...
g(x, y).are_talking_about_sex
puts x.stats
puts y.stats
# If the girl is pregnant...
child = $w.time_to_bear(y)
$w.add(child)
MSG
end


class Numeric
  
  def shrt
    self.round_to 0.1
  end
  
end


def wait(time)
  system "sleep #{time}"
end


def chance(probability)
  realized = (rand < probability)
  if realized and block_given? then yield; end
  return realized
end


def once
  loop do
    yield
    break
  end
end


class Range
  
  def choice
    if self.begin.is_a? Numeric and self.end.is_a? Numeric
      self.begin + (self.end - self.begin) * rand
    else
      super.choice
    end
  end
  
end


class Names
  
  def random_boy_name
    [
      cons + vowel + cons + vowel + cons,
    ].choice.capitalize
  end
  
  def random_girl_name
    [
      cons + vowel + cons + 'a',
      cons + vowel + cons + vowel + cons + 'a',
      vowel + cons + vowel + cons + 'a',
    ].choice.capitalize
  end
  
  private
  
  def vowel
    'aeiouy'.chars.to_a.choice
  end
  
  def cons
    'bcdfgklmnprstvwxz'.chars.to_a.choice
  end
  
end

def names
  @names ||= Names.new
end


def world_private; end


class World
  
  def initialize()
    @residents = []
  end
  
  def add(resident)
    @residents << resident
  end
  
  def residents
    @residents.dup
  end
  
  def stats(resident)
    puts resident.stats
  end
  
  # returns born Anthro or nil.
  def time_to_bear(woman)
    x = nil
    if woman.pregnant? then add(x = woman.bear()); end
    return x
  end
  
  def time_to_die(resident)
    @residents.delete resident
  end
  
end

$world = $w = World.new

def introduce(name, gender)
  result =
    case gender
    when :m, :male then MaleAnthro.new
    when :f, :female then FemaleAnthro.new
    end
  result.gets_name(name)
  $world.add(result)
  return result
end

alias intr introduce


def group_private; end


class Group
  
  def initialize(*participants)
    @participants = participants
  end
  
  def Group.[](*participants)
    Group.new(*participants)
  end
  
  def are_chatting()
    puts "They are chatting."; wait 5
    if participants.length == 2 && a1.gender != a2.gender then
      chance 0.5 do they.like_each_other; end
      chance 0.1 do they.unlike_each_other; end
    end
    return
  end
  
  def are_talking_about_sex()
    if not they.like_each_other? then puts "They can not talk about sex."; return; end
    if girl.pregnant? then puts "Girl is pregnant. They can not talk about sex now."; return; end
    puts "They are talking about sex."; wait 5
    if they.want_sex? then they.are_having_sex; end
    return
  end
  
  def make_them_fuck()
    if girl.pregnant? then puts "Girl is pregnant. You can not make her to fuck."; return; end
    puts "You push #{boy.name} and #{girl.name} in one room and tell: \"fuck! Or one of you will die!\" And you close the door."
    wait 5
    they.are_having_sex
  end
  
  protected
  
  def are_having_sex()
    puts "They are kissing..."; wait 5
    
    a1.has_started_to_have_sex(a2); a2.has_started_to_have_sex(a1)
    puts "They are kissing passionately and undressing each other."; wait 5
    
    puts "They have laid together, they are nude, continuning to kiss and caress."; wait 5
    
    puts "#{boy.name} inserts his penis into #{girl.name}."
    participants.each do |p| p.loses_virginity end
    wait 3
      
    once do
      
      until boy.overexcited?
        puts "(...)"
        if girl.overexcited?
          girl.feels_orgasm
        end
        participants.each { |p| p.sex_friction_made; }
        wait 0.8
      end
      boy.feels_orgasm
      wait 1
      print "#{boy.name} pours out sperm... "; (4..6).choice.to_i.times do wait 1; print "more sperm... "; end; puts
      chance(boy.fertility * girl.fertility) do girl.becomes_pregnant; end
      wait 3
      
      (10..20).choice.to_i.times do print "Huff... "; wait 1.2; end
      puts
      wait 1
      
     <<EOF
#{inspect}:
Sexual power: #{@sexuality.initial_sexual_power.shrt}
Orgasm gives: #{@sexuality.orgasm_serotonine_bonus.shrt} of serotonine.
Orgasm drops sexual power by: #{@sexuality.orgasm_sexual_power_divider.shrt}
Fertility: #{(fertility * 100).to_f.shrt}%
Likes: #{@likes.to_a.join ", "}
Happiness: #{happiness.shrt}

EOF
  end
  
  group_private
  
  def likes(who)
    @likes << who
  end
  
  def unlikes(who)
    @likes.delete(who)
  end
  
  def likes?(who)
    @likes.include? who
  end
  
  def fertility
    @sexuality.fertility
  end
  
  def loses_virginity
    @virgin = false
  end
  
  abstract :wanna_sex_with?
  
  def has_started_to_have_sex(partner)
    @current_sexual_power = @sexuality.initial_sexual_power
    @current_sex_partner = partner
  end
  
  def sex_friction_made()
    @excitement += @current_sexual_power
    x = sex_friction_cry; puts "#{name}: #{x}" unless x.nil? || x.blank?
  end
  
  abstract :sex_friction_cry
  
  def overexcited?
    @excitement > 100
  end
  
  def feels_orgasm
    @current_sexual_power /= @sexuality.orgasm_sexual_power_divider
    @serotonine += @sexuality.orgasm_serotonine_bonus
    @excitement = 0
    print "#{name} (ORGASM): "; orgasm_cry.chars.each { |char| print char; wait 0.05 }; puts
  end
  
  abstract :orgasm_cry
  
  def sex_is_finished()
    @current_sexual_power = nil
    @excitement = 0
    @current_sex_partner = nil
  end
  
  abstract :wants_one_more_sex_act?
  
  protected
  
  def virgin?
    @virgin
  end
  
  def sex_partner
    @current_sex_partner
  end
  
  def me
    self
  end
  
  attr_reader :current_sexual_power
  
  attr_reader :excitement
  
  abstract :initial_sexuality
  
  class Sexuality
    
    attr_accessor :initial_sexual_power
    attr_accessor :orgasm_serotonine_bonus
    attr_accessor :orgasm_sexual_power_divider
    attr_accessor :fertility
    
  end
  
end


class MaleAnthro < Anthro
  
  def initialize()
    super()
  end
  
  def gender; :male; end
  
  def inspect
    "#{virgin? ? "Boy" : "Mr"} #{name}"
  end
  
  group_private
  
  def want_sex_with?(who)
    me.likes? who
  end
  
  def wants_one_more_sex_act?
    current_sexual_power > (0.05..0.5).choice
  end
  
  def sex_friction_cry
    if excitement < 80
      [
        'Mmm!',
        'Aaah!',
        "#{sex_partner.name}!",
        "#{sex_partner.name}!",
        'Yeah!',
        'My girl!',
        "I love you #{sex_partner.name}!",
        'Oh yeah!',
        'I love you!',
        'Your breasts!..',
        'Your belly!..',
        nil,
        nil,
        nil,
        nil,
        nil,
      ].choice
    else
      [
        'AH!',
        'AH!',
        'YEAH!',
      ].choice
    end
  end
  
  def orgasm_cry
    [
      'OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOH YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAaaaaaaaaaaah!..',
      'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaaaaaaah!..',
    ].choice
  end
  
  def initial_sexuality
    s = Sexuality.new
    s.initial_sexual_power = (0.5..5).choice
    s.orgasm_serotonine_bonus = (10..20).choice
    s.orgasm_sexual_power_divider = (1.5..5).choice
    s.fertility = rand
    return s
  end
  
end


class FemaleAnthro < Anthro
  
  def initialize()
    super()
    @pregnant = false
  end
  
  def gender; :female; end
  
  def pregnant?
    @pregnant
  end
  
  def inspect
    if pregnant? then "Pregnant #{name}";
    else "#{virgin? ? "Girl" : "Lady"} #{name}"; end
  end
  
  group_private
  
  def want_sex_with?(who)
    me.likes?(who) and not pregnant? and chance(0.5)
  end
  
  def sex_friction_cry
    if excitement < 90
      [
        'Aaah!',
        'Yeah!',
        'Mmm!',
        'Nnn!',
        'Mmm!',
        'Fuck me!',
        'Your hands!..',
        "#{sex_partner.name}!",
        nil
      ].choice
    else
      [
        'AH!',
        'AH!',
        'YAH!',
        "#{sex_partner.name.upcase}!",
        'OH MY GOD!',
      ].choice
    end
  end
  
  def orgasm_cry
    [
      'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH!..',
      'YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH!..',
      'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH MY GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOD!..',
    ].choice
  end
  
  def becomes_pregnant
    @pregnant = true
  end
  
  def loses_virginity
    puts "#{name}: AH! Mmmmm..." if virgin?
    super()
  end
  
  def wants_one_more_sex_act?
    chance 0.8
  end
  
  def initial_sexuality
    s = Sexuality.new
    s.initial_sexual_power = (0.1..2).choice
    s.orgasm_serotonine_bonus = (20..50).choice
    s.orgasm_sexual_power_divider = (1..2).choice
    s.fertility = rand
    return s
  end
  
  world_private
  
  # returns new Anthro.
  def bear()
    return if not pregnant?
    @pregnant = false
    result = chance(0.5) ? MaleAnthro.new : FemaleAnthro.new
    result.gets_name(
      case result.gender
      when :male then names.random_boy_name
      when :female then names.random_girl_name
      end)
    return result
  end
  
end

 

Revise this Paste

Your Name: Code Language: